]> git.mxchange.org Git - flightgear.git/commitdiff
ping a client to make sure it is alive before launching a process on it.
authorcurt <curt>
Fri, 11 Jun 1999 00:25:03 +0000 (00:25 +0000)
committercurt <curt>
Fri, 11 Jun 1999 00:25:03 +0000 (00:25 +0000)
Tools/Construct/Parallel/fgfs-launch-clients
Tools/Construct/Parallel/fgfs-launch-server

index 4f3f587b14bf089e34a1fea9cdfa26113217e912..0eaab1c09c9455bd469e927f87bb3ff9c950ee54 100755 (executable)
@@ -88,7 +88,12 @@ fi
 # launch a copy of the client process on each specified machine
 
 for i in $CLIENTS_RUDE; do
-    echo "Launching client process on $i"
+    if ping -c 1 -i 5 $i > /dev/null; then
+       echo "Launching client process on $i"
+    else
+       echo "client $i is currently down, skipping"
+       continue
+    fi
 
     LOG_FILE="${LOG_DIR}/client-$i.log"
 
@@ -104,7 +109,12 @@ for i in $CLIENTS_RUDE; do
 done
 
 for i in $CLIENTS_NICE; do
-    echo "Launching client process on $i"
+    if ping -c 1 -i 5 $i > /dev/null; then
+       echo "Launching client process on $i"
+    else
+       echo "client $i is currently down, skipping"
+       continue
+    fi
 
     LOG_FILE="${LOG_DIR}/client-$i.log"
 
index 1601873e198014bab0979eff74aba92853f99624..5dd513d6e021799506dd7e34c67703a39239ca6c 100755 (executable)
@@ -83,4 +83,4 @@ echo $SERVER_PORT > $MASTER_ON
 echo "server is now running in background:"
 echo "  host = $SERVER_HOST"
 echo "  pid =  $SERVER_PID"
-echo "  port = $SERVER_PORT"
\ No newline at end of file
+echo "  port = $SERVER_PORT"