From f10fbf2a77f783e94d1d14ac412a875871c2ed30 Mon Sep 17 00:00:00 2001 From: David Chou Date: Fri, 3 Apr 2015 00:04:11 -0700 Subject: [PATCH] also try telnet to check if host is up another option to pass the connection test if you don't have ICMP open on your firewall --- Linux Script/configure-linux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linux Script/configure-linux.sh b/Linux Script/configure-linux.sh index 42ac9dd..e0723bc 100644 --- a/Linux Script/configure-linux.sh +++ b/Linux Script/configure-linux.sh @@ -268,7 +268,7 @@ setLinuxVariables() checkIfLogglyServersAccessible() { echo "INFO: Checking if $LOGS_01_HOST is reachable." - if [ $(ping -c 1 $LOGS_01_HOST | grep "1 packets transmitted, 1 received, 0% packet loss" | wc -l) == 1 ]; then + if [ $(ping -c 1 $LOGS_01_HOST | grep "1 packets transmitted, 1 received, 0% packet loss" | wc -l) == 1 ] || [ $(sleep 1 | telnet $LOGS_01_HOST $LOGGLY_SYSLOG_PORT | grep Connected | wc -l) == 1 ]; then echo "INFO: $LOGS_01_HOST is reachable." else logMsgToConfigSysLog "ERROR" "ERROR: $LOGS_01_HOST is not reachable. Please check your network and firewall settings."