diff --git a/dev/debug_osync.sh b/dev/debug_osync.sh index 187db45..5d0a2ca 100755 --- a/dev/debug_osync.sh +++ b/dev/debug_osync.sh @@ -11,7 +11,7 @@ PROGRAM_VERSION=1.1-dev PROGRAM_BUILD=2016030801 IS_STABLE=no -## FUNC_BUILD=2016030801 +## FUNC_BUILD=2016031001 ## 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 @@ -564,7 +564,7 @@ function WaitForCompletion { SendAlert fi if [ $SECONDS -gt $hard_max_time ] && [ $hard_max_time != 0 ]; then - Logger "Max hard execution time exceeded for script. Stopping current task execution." "ERROR" + Logger "Max hard execution time exceeded for script in [$caller_name]. Stopping current task execution." "ERROR" kill -s SIGTERM $pid if [ $? == 0 ]; then Logger "Task stopped succesfully" "NOTICE" @@ -706,14 +706,14 @@ function CheckConnectivity3rdPartyHosts { eval "$PING_CMD $i > /dev/null 2>&1" & WaitForTaskCompletion $! 360 360 ${FUNCNAME[0]} if [ $? != 0 ]; then - Logger "Cannot ping 3rd party host $i" "WARN" + Logger "Cannot ping 3rd party host $i" "NOTICE" else remote_3rd_party_success=1 fi done IFS=$OLD_IFS if [ $remote_3rd_party_success -ne 1 ]; then - Logger "No remote 3rd party host responded to ping. No internet ?" "CRITICAL" + Logger "No remote 3rd party host responded to ping. No internet ?" "ERROR" return 1 fi fi diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index ecca8c4..a29a678 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -1,4 +1,4 @@ -## FUNC_BUILD=2016030801 +## FUNC_BUILD=2016031001 ## 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 @@ -551,7 +551,7 @@ function WaitForCompletion { SendAlert fi if [ $SECONDS -gt $hard_max_time ] && [ $hard_max_time != 0 ]; then - Logger "Max hard execution time exceeded for script. Stopping current task execution." "ERROR" + Logger "Max hard execution time exceeded for script in [$caller_name]. Stopping current task execution." "ERROR" kill -s SIGTERM $pid if [ $? == 0 ]; then Logger "Task stopped succesfully" "NOTICE" @@ -693,14 +693,14 @@ function CheckConnectivity3rdPartyHosts { eval "$PING_CMD $i > /dev/null 2>&1" & WaitForTaskCompletion $! 360 360 ${FUNCNAME[0]} if [ $? != 0 ]; then - Logger "Cannot ping 3rd party host $i" "WARN" + Logger "Cannot ping 3rd party host $i" "NOTICE" else remote_3rd_party_success=1 fi done IFS=$OLD_IFS if [ $remote_3rd_party_success -ne 1 ]; then - Logger "No remote 3rd party host responded to ping. No internet ?" "CRITICAL" + Logger "No remote 3rd party host responded to ping. No internet ?" "ERROR" return 1 fi fi diff --git a/osync.sh b/osync.sh index 060e3d1..58bcbf7 100755 --- a/osync.sh +++ b/osync.sh @@ -11,7 +11,7 @@ PROGRAM_VERSION=1.1-dev PROGRAM_BUILD=2016030801 IS_STABLE=no -## FUNC_BUILD=2016030801 +## FUNC_BUILD=2016031001 ## 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 @@ -544,7 +544,7 @@ function WaitForCompletion { SendAlert fi if [ $SECONDS -gt $hard_max_time ] && [ $hard_max_time != 0 ]; then - Logger "Max hard execution time exceeded for script. Stopping current task execution." "ERROR" + Logger "Max hard execution time exceeded for script in [$caller_name]. Stopping current task execution." "ERROR" kill -s SIGTERM $pid if [ $? == 0 ]; then Logger "Task stopped succesfully" "NOTICE" @@ -679,14 +679,14 @@ function CheckConnectivity3rdPartyHosts { eval "$PING_CMD $i > /dev/null 2>&1" & WaitForTaskCompletion $! 360 360 ${FUNCNAME[0]} if [ $? != 0 ]; then - Logger "Cannot ping 3rd party host $i" "WARN" + Logger "Cannot ping 3rd party host $i" "NOTICE" else remote_3rd_party_success=1 fi done IFS=$OLD_IFS if [ $remote_3rd_party_success -ne 1 ]; then - Logger "No remote 3rd party host responded to ping. No internet ?" "CRITICAL" + Logger "No remote 3rd party host responded to ping. No internet ?" "ERROR" return 1 fi fi