We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 826a691 + 1ce3bc0 commit f5c1c09Copy full SHA for f5c1c09
sledgehammer/start-up.sh
@@ -150,8 +150,13 @@ echo "*.* @@${ADMIN_IP}" >> /etc/rsyslog.conf
150
service $RSYSLOGSERVICE restart
151
152
# Sometimes at this point network is not up yet, wait for it
153
-echo "Waiting for admin server ($ADMIN_IP) to be reachable; will wait up to 60 seconds..."
154
-ping -c 1 -w 60 $ADMIN_IP > /dev/null || {
+n=60
+echo "Waiting for admin server ($ADMIN_IP) to be reachable; will wait up to $n seconds..."
155
+while (( $n > 0 )) && ! ping -q -c 1 -w 1 $ADMIN_IP > /dev/null ; do
156
+ sleep 1
157
+ let n--
158
+done
159
+(( $n > 0 )) || {
160
echo "Admin server ($ADMIN_IP) not reachable."
161
echo "Things will end badly."
162
}
0 commit comments