2 c4d78a34 2002-09-09 alex # ngIRCd Test Suite
3 450251f0 2004-09-06 alex # $Id: stop-server.sh,v 1.13 2004/09/06 22:04:06 alex Exp $
5 9d928b24 2002-09-23 alex [ -z "$srcdir" ] && srcdir=`dirname $0`
7 450251f0 2004-09-06 alex # read in functions
8 450251f0 2004-09-06 alex . ${srcdir}/functions.inc
10 450251f0 2004-09-06 alex echo_n " stopping server ..."
12 1ed708ef 2003-08-22 alex # stop test-server ...
13 797f9170 2002-11-10 alex pid=`./getpid.sh T-ngircd`
14 1ed708ef 2003-08-22 alex if [ -z "$pid" ]; then
15 c5bdd86f 2004-09-04 alex echo " failure: no running server found!?"
18 1ed708ef 2003-08-22 alex kill $pid > /dev/null 2>&1 || exit 1
20 1ed708ef 2003-08-22 alex # waiting ...
21 1ed708ef 2003-08-22 alex for i in 1 2 3 4 5; do
22 c5bdd86f 2004-09-04 alex kill -0 $pid > /dev/null 2>&1; r=$?
23 b04a526a 2004-09-06 alex if [ $r -ne 0 ]; then
29 c5bdd86f 2004-09-04 alex echo " failure: server still running!?"