Fix lock to support more than one backup script running (#163)
This commit is contained in:
committed by
Laurent Cozic
parent
b460078ab0
commit
27c56e9690
+2
-1
@@ -428,7 +428,8 @@ if [ -n "$(fn_find "$INPROGRESS_FILE")" ]; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
RUNNINGPID="$(fn_run_cmd "cat $INPROGRESS_FILE")"
|
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."
|
fn_log_error "Previous backup task is still active - aborting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user