mirror of
https://github.com/ivanilves/xiringuito.git
synced 2025-05-18 08:10:23 -07:00
Merge branch 'chore/better-exit'
* chore/better-exit: Better exit if SSH down
This commit is contained in:
commit
fcaf6c2a61
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user