Merge pull request #109 from NathanFrench/master
Fix to assure only one instance is running.
This commit is contained in:
+3
-3
@@ -103,7 +103,7 @@ fn_parse_ssh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn_run_cmd() {
|
fn_run_cmd() {
|
||||||
if [ -n "$SSH_DEST_FOLDER_PREFIX" ]
|
if [ -n "$SSH_DEST_FOLDER_PREFIX" ]
|
||||||
then
|
then
|
||||||
eval "$SSH_CMD '$1'"
|
eval "$SSH_CMD '$1'"
|
||||||
else
|
else
|
||||||
@@ -305,9 +305,9 @@ if [ -n "$(fn_find "$INPROGRESS_FILE")" ]; then
|
|||||||
fn_log_error "Previous backup task is still active - aborting (command: $RUNNINGCMD)."
|
fn_log_error "Previous backup task is still active - aborting (command: $RUNNINGCMD)."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
RUNNINGPID="$(fn_run_cmd "cat $INPROGRESS_FILE")"
|
RUNNINGPID="$(fn_run_cmd "cat $INPROGRESS_FILE")"
|
||||||
if [ "$RUNNINGPID" = "$(pgrep "$APPNAME")" ]; then
|
if [ "$RUNNINGPID" = "$(pgrep -o -f "$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