From e8e0806823fe13a1c942743b8662c753612c114c Mon Sep 17 00:00:00 2001 From: Brandon Dusseau Date: Sat, 19 Mar 2016 00:27:51 -0400 Subject: [PATCH] Fixes issue with incorrectly detecting if backup is already running if interrupted --- rsync_tmbackup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh index 2d67694..8991a84 100755 --- a/rsync_tmbackup.sh +++ b/rsync_tmbackup.sh @@ -191,7 +191,7 @@ if [ -n "$(fn_find "$INPROGRESS_FILE")" ]; then fn_log_warn "Cygwin only: Previous backup task has either been interrupted or it might still be active, but there is currently no check for this. Assuming that the task was simply interrupted." else RUNNINGPID="$(fn_run_cmd "cat $INPROGRESS_FILE")" - if [ "$RUNNINGPID"="$(pgrep "$APPNAME")" ]; then + if [ "$RUNNINGPID" = "$(pgrep "$APPNAME")" ]; then fn_log_error "Previous backup task is still active - aborting." exit 1 fi