geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r700268 - /geronimo/sandbox/failover/cycleservers.sh
Date Mon, 29 Sep 2008 21:41:44 GMT
Author: dblevins
Date: Mon Sep 29 14:41:44 2008
New Revision: 700268

URL: http://svn.apache.org/viewvc?rev=700268&view=rev
Log:
Reworked to avoid "Killed" output

Modified:
    geronimo/sandbox/failover/cycleservers.sh

Modified: geronimo/sandbox/failover/cycleservers.sh
URL: http://svn.apache.org/viewvc/geronimo/sandbox/failover/cycleservers.sh?rev=700268&r1=700267&r2=700268&view=diff
==============================================================================
--- geronimo/sandbox/failover/cycleservers.sh (original)
+++ geronimo/sandbox/failover/cycleservers.sh Mon Sep 29 14:41:44 2008
@@ -1,11 +1,16 @@
 #!/bin/bash
 
-(cd geronimo-plugin-farm-node-2.2-SNAPSHOT
+# Split out as a separate function to avoid output like:
+# "./cycleservers.sh: line 3:  8472 Killed                  ./bin/gsh geronimo/start-server
...."
+function start (){
+    ./bin/gsh geronimo/start-server -s ${server} -G config.substitution.PortOffset=${s}0
&> ${s}.log 
+}
+
+e(cd geronimo-plugin-farm-node-2.2-SNAPSHOT
 
 while true; do
 
   for server in server*; do
-
     pid=$(ps ax | grep "gshell-bootstrap.jar geronimo/start-server -s $server" | grep -v
'grep' | cut -c 1-6)
 
     if [ $pid ] ; then   
@@ -23,10 +28,11 @@
 
     s=${server/server/}
     echo "Starting $server id $s"
-    ./bin/gsh geronimo/start-server -s ${server} -G config.substitution.PortOffset=${s}0
>${s}.log &
+    start &> /dev/null &
 
     sleep 10
   done
 
 done
-)
\ No newline at end of file
+)
+



Mime
View raw message