diff --git a/impfilesbk b/impfilesbk index d02b0d9..f111248 100644 --- a/impfilesbk +++ b/impfilesbk @@ -2,6 +2,9 @@ # This script backs up some important stuff +# Run only one instance of this script at one time +[ "${BKLOCKER}" != "running" ] && exec env BKLOCKER="running" flock -en "/tmp/impfilesbk" "$0" "$@" || : + # Setup location for home and backup directory HMDIR="/home/sintan" BKDIR="/mnt/storage/sintan"