Update btrfs-backup script. Add lock file generation

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

View file

@ -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