From fbc6b5d3c2e30375be468984c40f07053362b54e Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 15 Nov 2016 22:09:47 +0100 Subject: [PATCH] Fixed logger flags not gotten from subprocesses --- dev/n_osync.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dev/n_osync.sh b/dev/n_osync.sh index 996f54c..538ac4c 100755 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -4,7 +4,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=1.1.5 -PROGRAM_BUILD=2016111501 +PROGRAM_BUILD=2016111502 IS_STABLE=yes source "./ofunctions.sh" @@ -30,6 +30,14 @@ function TrapStop { function TrapQuit { local exitcode= + # Get ERROR / WARN alert flags from subprocesses that call Logger + if [ -f "$RUN_DIR/$PROGRAM.Logger.warn.$SCRIPT_PID" ]; then + WARN_ALERT=1 + fi + if [ -f "$RUN_DIR/$PROGRAM.Logger.error.$SCRIPT_PID" ]; then + ERROR_ALERT=1 + fi + if [ $ERROR_ALERT -ne 0 ]; then UnlockReplicas if [ "$_DEBUG" != "yes" ]