From 6075b92c91528399d6ce479e0125a6335f02457f Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 10 Nov 2016 16:18:29 +0100 Subject: [PATCH] Some logging fixes --- dev/n_obackup.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dev/n_obackup.sh b/dev/n_obackup.sh index 6aab525..1c11679 100755 --- a/dev/n_obackup.sh +++ b/dev/n_obackup.sh @@ -9,7 +9,7 @@ PROGRAM="obackup" AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=2.1-dev -PROGRAM_BUILD=2016102303 +PROGRAM_BUILD=2016111001 IS_STABLE=no source "./ofunctions.sh" @@ -1688,8 +1688,16 @@ else LOG_FILE="$LOGFILE" fi +fi + +if [ ! -w "$(dirname LOG_FILE)" ]; then + echo "Cannot write to log [$(dirname LOG_FILE)]." +else + Logger "Script begin, logging to [$LOG_FILE]." "DEBUG" +fi + if [ "$IS_STABLE" != "yes" ]; then - Logger "This is an unstable dev build. Please use with caution." "WARN" + Logger "This is an unstable dev build [$PROGRAM_BUILD]. Please use with caution." "WARN" fi DATE=$(date)