backup2me.sh: Fix lock not preventing the execution of the rest of the script
This commit is contained in:
parent
e73cecf0ef
commit
1a51f3426d
@ -10,7 +10,10 @@ function join {
|
|||||||
printf "%s" "${@/#/$d$p}";
|
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 ###
|
### Program arguments ###
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user