]> arthur.barton.de Git - ngircd.git/blob - src/testsuite/stop-server.sh
e9acbb31baa276b320a1e50046892defc4e69a48
[ngircd.git] / src / testsuite / stop-server.sh
1 #!/bin/sh
2 # ngIRCd Test Suite
3 # $Id: stop-server.sh,v 1.4.2.1 2002/09/20 13:46:22 alex Exp $
4
5 echo "      stopping server ..."
6
7 PS_FLAGS=-f; PS_PIDCOL=2
8 ps $PS_FLAGS > /dev/null 2>&1
9 if [ $? -ne 0 ]; then PS_FLAGS=a; PS_PIDCOL=1; fi
10
11 ps $PS_FLAGS > procs.tmp
12 pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`
13 kill $pid > /dev/null 2>&1
14
15 # -eof-