1
0
mirror of https://github.com/deajan/obackup.git synced 2024-11-12 19:03:42 +01:00

Added return codes logs to connectivitychecks

This commit is contained in:
deajan 2016-09-02 15:34:24 +02:00
parent fa038f9994
commit 9fabedaeb4

View File

@ -1,6 +1,6 @@
#### MINIMAL-FUNCTION-SET BEGIN ####
## FUNC_BUILD=2016090101
## FUNC_BUILD=2016090201
## BEGIN Generic bash functions written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
## To use in a program, define the following variables:
@ -1089,7 +1089,7 @@ function CheckConnectivityRemoteHost {
eval "$PING_CMD $REMOTE_HOST > /dev/null 2>&1" &
WaitForTaskCompletion $! 60 180 ${FUNCNAME[0]} true $KEEP_LOGGING
if [ $? != 0 ]; then
Logger "Cannot ping $REMOTE_HOST" "ERROR"
Logger "Cannot ping [$REMOTE_HOST]. Return code [$?]." "ERROR"
return 1
fi
fi
@ -1111,7 +1111,7 @@ function CheckConnectivity3rdPartyHosts {
eval "$PING_CMD $i > /dev/null 2>&1" &
WaitForTaskCompletion $! 180 360 ${FUNCNAME[0]} true $KEEP_LOGGING
if [ $? != 0 ]; then
Logger "Cannot ping 3rd party host $i" "NOTICE"
Logger "Cannot ping 3rd party host [$i]. Return code [$?]." "NOTICE"
else
remote_3rd_party_success=true
fi