Update btrfs-backup script. Add lock file generation

This commit is contained in:
albert 2024-12-19 04:51:54 +01:00
parent c8fa2f2b05
commit 3410cbee8f
Signed by: albert
GPG key ID: 3895DD267CA11BA9

View file

@ -53,7 +53,7 @@ create_lock() {
fi fi
# Create new lock file with current PID # Create new lock file with current PID
echo $$ > "$LOCK_FILE" sudo echo $$ > "$LOCK_FILE"
# Ensure lock file is removed on script exit # Ensure lock file is removed on script exit
trap cleanup_lock EXIT trap cleanup_lock EXIT