diff --git a/nixos/common/software/cli/scripts/btrfs-backup.sh b/nixos/common/software/cli/scripts/btrfs-backup.sh index a07a90a2..f1db9735 100755 --- a/nixos/common/software/cli/scripts/btrfs-backup.sh +++ b/nixos/common/software/cli/scripts/btrfs-backup.sh @@ -37,7 +37,7 @@ LOCK_FILE="/var/run/btrfs-backup-${1}.lock" # Lock file creation with cleanup cleanup_lock() { - rm -f "$LOCK_FILE" + sudo rm -f "$LOCK_FILE" } create_lock() { @@ -48,7 +48,7 @@ create_lock() { exit 1 else # Lock file exists but process is not running, remove stale lock - rm -f "$LOCK_FILE" + cleanup_lock fi fi