diff --git a/backup2me.sh b/backup2me.sh index 30f9c5d..22e73c2 100755 --- a/backup2me.sh +++ b/backup2me.sh @@ -10,8 +10,11 @@ function join { printf "%s" "${@/#/$d$p}"; } -lockfile-create -p -r 2 $0 || (echo "Another backup is running, aborting" & exit 1) - +if ! lockfile-create -p -r 2 $0; then + echo "Another backup is running, aborting" + exit 1 +fi + ### Program arguments ### # Backup target directory