PID reuse

Checks for PID and $APPNAME in the results from pgrep in order to avoid
the problem where the PID from a previous run has been recycled by
another process.  This caused us to exit even though we are not
currently running.
This commit is contained in:
uglygus
2015-04-04 07:50:11 -04:00
parent a728820bfd
commit 2f64db5973
+1 -1
View File
@@ -113,7 +113,7 @@ fi
# -----------------------------------------------------------------------------
if [ -f "$INPROGRESS_FILE" ]; then
if pgrep -F "$INPROGRESS_FILE" > /dev/null 2>&1 ; then
if pgrep -F "$INPROGRESS_FILE" "$APPNAME"> /dev/null 2>&1 ; then
fn_log_error "Previous backup task is still active - aborting."
exit 1
fi