X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftestsuite%2Fstop-server.sh;h=a9cce99f87760f4a4f44d6c358efeac853dae654;hb=e68cdf304f1242bbeb3f0b59323f3059d0d543c4;hp=af28bae1b567d40ad2073f23824f6b6b8dced88b;hpb=508fa48aa6342beb50e510285b683abe54e0fe92;p=ngircd-alex.git diff --git a/src/testsuite/stop-server.sh b/src/testsuite/stop-server.sh index af28bae1..a9cce99f 100755 --- a/src/testsuite/stop-server.sh +++ b/src/testsuite/stop-server.sh @@ -1,15 +1,17 @@ #!/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.9 2002/11/10 14:28:06 alex Exp $ + +[ -z "$srcdir" ] && srcdir=`dirname $0` 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 +# Test-Server stoppen ... +pid=`./getpid.sh T-ngircd` +[ -n "$pid" ] && kill $pid > /dev/null 2>&1 || exit 1 +sleep 1 -ps $PS_FLAGS > procs.tmp -pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"` -kill $pid > /dev/null 2>&1 +# jetzt duerfte der Prozess nicht mehr laufen +kill -0 $pid > /dev/null 2>&1 && exit 1 || exit 0 # -eof-