mirror of
https://github.com/deajan/obackup.git
synced 2024-12-26 15:33:41 +01:00
Added return codes logs to connectivitychecks
This commit is contained in:
parent
fa038f9994
commit
9fabedaeb4
@ -1,6 +1,6 @@
|
|||||||
#### MINIMAL-FUNCTION-SET BEGIN ####
|
#### 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
|
## 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:
|
## To use in a program, define the following variables:
|
||||||
@ -1089,7 +1089,7 @@ function CheckConnectivityRemoteHost {
|
|||||||
eval "$PING_CMD $REMOTE_HOST > /dev/null 2>&1" &
|
eval "$PING_CMD $REMOTE_HOST > /dev/null 2>&1" &
|
||||||
WaitForTaskCompletion $! 60 180 ${FUNCNAME[0]} true $KEEP_LOGGING
|
WaitForTaskCompletion $! 60 180 ${FUNCNAME[0]} true $KEEP_LOGGING
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
Logger "Cannot ping $REMOTE_HOST" "ERROR"
|
Logger "Cannot ping [$REMOTE_HOST]. Return code [$?]." "ERROR"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -1111,7 +1111,7 @@ function CheckConnectivity3rdPartyHosts {
|
|||||||
eval "$PING_CMD $i > /dev/null 2>&1" &
|
eval "$PING_CMD $i > /dev/null 2>&1" &
|
||||||
WaitForTaskCompletion $! 180 360 ${FUNCNAME[0]} true $KEEP_LOGGING
|
WaitForTaskCompletion $! 180 360 ${FUNCNAME[0]} true $KEEP_LOGGING
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
Logger "Cannot ping 3rd party host $i" "NOTICE"
|
Logger "Cannot ping 3rd party host [$i]. Return code [$?]." "NOTICE"
|
||||||
else
|
else
|
||||||
remote_3rd_party_success=true
|
remote_3rd_party_success=true
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user