From 4fb8b6d238a3b8923b0c4e5aad1ca8c915be1751 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 25 May 2025 10:11:32 +0200 Subject: [PATCH] change remove only top folder by unmount --- backupmount | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/backupmount b/backupmount index 0f3d31a..88ec18b 100755 --- a/backupmount +++ b/backupmount @@ -102,14 +102,6 @@ mount_backup() errlog "no device was mounted" } -remote_backup_dir() -{ - infolog "remove backup path $backup_path" - rmdir "$backup_path" \ - || errlog "clound not remote $backup_path" \ - || return $? -} - umount_backup() { @@ -124,6 +116,11 @@ umount_backup() || errlog "could not unmount $backup_path" \ || return $? + infolog "remove backup path $backup_path" + rmdir "$backup_path" \ + || errlog "clound not remote $backup_path" \ + || return $? + local volume=$(cat "config.yaml" \ | yq --raw-output ".backup_volume") [ "$volume" != "null" ] \ -- 2.39.5