Better exit if SSH down

This commit is contained in:
Ivan Ilves 2017-04-02 22:42:07 +02:00
parent 4401aec84d
commit 10232e1a56

View File

@ -122,6 +122,8 @@ fi
set +e
FAILED_PINGS=0
while [[ ${FAILED_PINGS} -lt 5 ]]; do
kill -0 ${SSH_PID} &>/dev/null || exit 17
./scripts/client-ping-server.sh ${TUNNEL_ID} ${IP_BASE}
if [[ ${?} -ne 0 ]]; then
let FAILED_PINGS+=1