backup2me.sh: Fix lock not preventing the execution of the rest of the script
This commit is contained in:
parent
e73cecf0ef
commit
1a51f3426d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user