1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-28 21:06:16 +00:00
ngircd/src/testsuite/stop-server.sh

16 lines
393 B
Bash
Raw Normal View History

2002-09-09 10:16:24 +00:00
#!/bin/sh
# ngIRCd Test Suite
# $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 ..."
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 }"`
[ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
2002-09-09 10:16:24 +00:00
# -eof-