Fix lock to support more than one backup script running (#163)

This commit is contained in:
kapitainsky 2019-09-28 13:32:25 +01:00 committed by Laurent Cozic
parent b460078ab0
commit 27c56e9690

View file

@ -428,7 +428,8 @@ if [ -n "$(fn_find "$INPROGRESS_FILE")" ]; then
fi
else
RUNNINGPID="$(fn_run_cmd "cat $INPROGRESS_FILE")"
if [ "$RUNNINGPID" = "$(pgrep -o -f "$APPNAME")" ]; then
if ps -p "$RUNNINGPID" -o command | grep "$APPNAME"
then
fn_log_error "Previous backup task is still active - aborting."
exit 1
fi