remove PING_BEFORE_SSH

This commit is contained in:
Jérémy Lecour 2023-01-13 11:26:41 +01:00 committed by Jérémy Lecour
parent 22ba5ed823
commit e9cf39ad40
1 changed files with 0 additions and 9 deletions

View File

@ -746,10 +746,6 @@ test_server() {
host=$(echo "${item}" | cut -d':' -f1)
port=$(echo "${item}" | cut -d':' -f2)
if [ "${PING_BEFORE_SSH}" = "1" ]; then
ping -w 2 "${host}" > /dev/null
fi
# Test if the server is accepting connections
ssh -q -o "ConnectTimeout ${SSH_CONNECT_TIMEOUT}" "${host}" -p "${port}" -t "exit"
# shellcheck disable=SC2181
@ -1085,11 +1081,6 @@ SERVERS_FALLBACK=${SERVERS_FALLBACK:-1}
# timeout (in seconds) for SSH connections
SSH_CONNECT_TIMEOUT=${SSH_CONNECT_TIMEOUT:-90}
# Send a couple of ping packets before SSH.
# It comes from a weird bug in our network;
# the connection could not be established without a ping in the preceding 5 minutes.
PING_BEFORE_SSH=${PING_BEFORE_SSH:-1}
# execute main function
main