Merge branch 'chore/better-exit'

* chore/better-exit:
  Better exit if SSH down
This commit is contained in:
Ivan Ilves 2017-04-02 22:42:20 +02:00
commit fcaf6c2a61

View File

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