From f0f6e3c71a6b035db64a07acec116a542987dbe6 Mon Sep 17 00:00:00 2001 From: albert Date: Thu, 19 Dec 2024 05:12:05 +0100 Subject: [PATCH] Update btrfs-backup script. Add lock file generation --- nixos/common/software/cli/scripts/btrfs-backup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/common/software/cli/scripts/btrfs-backup.sh b/nixos/common/software/cli/scripts/btrfs-backup.sh index 936ce1e3..33a4dcfd 100755 --- a/nixos/common/software/cli/scripts/btrfs-backup.sh +++ b/nixos/common/software/cli/scripts/btrfs-backup.sh @@ -53,6 +53,7 @@ create_lock() { fi # Create new lock file with current PID + sudo touch "$LOCK_FILE" sudo echo $$ > "$LOCK_FILE" # Ensure lock file is removed on script exit