]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/testsuite/stop-server.sh
- Parameter fuer ps werden in anderer (besserer) Reihenfolge getestet.
[ngircd-alex.git] / src / testsuite / stop-server.sh
index af28bae1b567d40ad2073f23824f6b6b8dced88b..ee9d9dccfd9c3f319226f9153acb6146aa051b47 100755 (executable)
@@ -1,12 +1,12 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: stop-server.sh,v 1.4 2002/09/16 09:53:16 alex Exp $
+# $Id: stop-server.sh,v 1.5 2002/09/18 20:58:56 alex Exp $
 
 echo "      stopping server ..."
 
-PS_FLAGS=a; PS_PIDCOL=1
-ps a > /dev/null 2>&1
-if [ $? -ne 0 ]; then PS_FLAGS=-f; PS_PIDCOL=2; fi
+PS_FLAGS=-f; PS_PIDCOL=2
+ps $PS_FLAGS > /dev/null 2>&1
+if [ $? -ne 0 ]; then PS_FLAGS=a; PS_PIDCOL=1; fi
 
 ps $PS_FLAGS > procs.tmp
 pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`