X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Ftestsuite%2Fstop-server.sh;h=af28bae1b567d40ad2073f23824f6b6b8dced88b;hp=7cacc83e4e456e910726a2ab74faf44da4562ec0;hb=508fa48aa6342beb50e510285b683abe54e0fe92;hpb=3f873b0c39cfc466ae44602f4cec39dae98c6d8b diff --git a/src/testsuite/stop-server.sh b/src/testsuite/stop-server.sh index 7cacc83e..af28bae1 100755 --- a/src/testsuite/stop-server.sh +++ b/src/testsuite/stop-server.sh @@ -1,11 +1,15 @@ #!/bin/sh # ngIRCd Test Suite -# $Id: stop-server.sh,v 1.2 2002/09/12 02:27:47 alex Exp $ +# $Id: stop-server.sh,v 1.4 2002/09/16 09:53:16 alex Exp $ echo " stopping server ..." -ps a > procs.tmp -pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$1 }"` +PS_FLAGS=a; PS_PIDCOL=1 +ps a > /dev/null 2>&1 +if [ $? -ne 0 ]; then PS_FLAGS=-f; PS_PIDCOL=2; fi + +ps $PS_FLAGS > procs.tmp +pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"` kill $pid > /dev/null 2>&1 # -eof-