From 5f5ac1850d74aa5c66c6167e47c518571d11c0d4 Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 10 Nov 2016 16:29:20 +0100 Subject: [PATCH] Fixed logging issue with multiple users --- dev/n_osync.sh | 2 +- dev/ofunctions.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/n_osync.sh b/dev/n_osync.sh index f3c4357..06eab5a 100755 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -3,7 +3,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.3 +PROGRAM_VERSION=1.1.4 PROGRAM_BUILD=2016090201 IS_STABLE=yes diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 389adbb..9856a32 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -1,4 +1,4 @@ -## FUNC_BUILD=2016071902-c +## FUNC_BUILD=2016071902-d ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr ## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode @@ -71,7 +71,7 @@ fi # Default alert attachment filename -ALERT_LOG_FILE="$RUN_DIR/$PROGRAM.last.log" +ALERT_LOG_FILE="$RUN_DIR/$PROGRAM.$$.last.log" # Set error exit code if a piped command fails set -o pipefail @@ -342,7 +342,7 @@ function SendAlert { # Delete tmp log file if [ -f "$ALERT_LOG_FILE" ]; then - rm "$ALERT_LOG_FILE" + rm -f "$ALERT_LOG_FILE" fi } @@ -377,7 +377,7 @@ function SendEmail { local auth_string= if [ ! -f "$attachment" ]; then - attachment_command="-a $ALERT_LOG_FILE" + attachment_command="-a $attachment" mail_no_attachment=1 else mail_no_attachment=0