mirror of
https://github.com/laurent22/rsync-time-backup
synced 2024-11-12 23:17:06 +00:00
Fix lock to support more than one backup script running (#163)
This commit is contained in:
parent
b460078ab0
commit
27c56e9690
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue