2002-09-09 10:16:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# ngIRCd Test Suite
|
2002-09-20 13:57:01 +00:00
|
|
|
# $Id: stop-server.sh,v 1.6 2002/09/20 13:57:01 alex Exp $
|
2002-09-09 10:16:24 +00:00
|
|
|
|
|
|
|
echo " stopping server ..."
|
|
|
|
|
2002-09-18 20:58:56 +00:00
|
|
|
PS_FLAGS=-f; PS_PIDCOL=2
|
|
|
|
ps $PS_FLAGS > /dev/null 2>&1
|
|
|
|
if [ $? -ne 0 ]; then PS_FLAGS=a; PS_PIDCOL=1; fi
|
2002-09-16 09:53:16 +00:00
|
|
|
|
|
|
|
ps $PS_FLAGS > procs.tmp
|
|
|
|
pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`
|
2002-09-20 13:57:01 +00:00
|
|
|
[ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
|
2002-09-09 10:16:24 +00:00
|
|
|
|
|
|
|
# -eof-
|