From 3410cbee8f4f7702e443b0d01ae105a3bd058a28 Mon Sep 17 00:00:00 2001 From: albert Date: Thu, 19 Dec 2024 04:51:54 +0100 Subject: [PATCH] Update btrfs-backup script. Add lock file generation --- nixos/common/software/cli/scripts/btrfs-backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/common/software/cli/scripts/btrfs-backup.sh b/nixos/common/software/cli/scripts/btrfs-backup.sh index 9e8d06bd..936ce1e3 100755 --- a/nixos/common/software/cli/scripts/btrfs-backup.sh +++ b/nixos/common/software/cli/scripts/btrfs-backup.sh @@ -53,7 +53,7 @@ create_lock() { fi # Create new lock file with current PID - echo $$ > "$LOCK_FILE" + sudo echo $$ > "$LOCK_FILE" # Ensure lock file is removed on script exit trap cleanup_lock EXIT