Blame


1 c4d78a34 2002-09-09 alex #!/bin/sh
2 c4d78a34 2002-09-09 alex # ngIRCd Test Suite
3 797f9170 2002-11-10 alex # $Id: start-server.sh,v 1.10 2002/11/10 14:28:06 alex Exp $
4 c4d78a34 2002-09-09 alex
5 9d928b24 2002-09-23 alex [ -z "$srcdir" ] && srcdir=`dirname $0`
6 9d928b24 2002-09-23 alex
7 c4d78a34 2002-09-09 alex echo " starting server ..."
8 c4d78a34 2002-09-09 alex
9 efedfe12 2002-09-20 alex # alte Logfiles loeschen
10 efedfe12 2002-09-20 alex rm -rf logs *.log
11 05bf66df 2002-09-12 alex
12 efedfe12 2002-09-20 alex # pruefen, ob getpid.sh gueltige PID's liefert. Wenn dem nicht so ist,
13 efedfe12 2002-09-20 alex # wird kein ngIRCd gestartet, da dieser ansonsten nicht mehr am Ende
14 efedfe12 2002-09-20 alex # des Testlaufs beendet werden koennte!
15 797f9170 2002-11-10 alex ./getpid.sh sh > /dev/null 2>&1
16 efedfe12 2002-09-20 alex if [ $? -ne 0 ]; then
17 efedfe12 2002-09-20 alex echo " error: getpid.sh FAILED!"
18 efedfe12 2002-09-20 alex exit 1
19 efedfe12 2002-09-20 alex fi
20 efedfe12 2002-09-20 alex
21 efedfe12 2002-09-20 alex # MOTD fuer Test-Server erzeugen
22 c4d78a34 2002-09-09 alex echo "This is an ngIRCd Test Server" > ngircd-test.motd
23 c4d78a34 2002-09-09 alex
24 efedfe12 2002-09-20 alex # Test-Server starten ...
25 797f9170 2002-11-10 alex ./T-ngircd -np -f ${srcdir}/ngircd-test.conf > ngircd-test.log 2>&1 &
26 c4d78a34 2002-09-09 alex sleep 1
27 c4d78a34 2002-09-09 alex
28 efedfe12 2002-09-20 alex # validieren, dass Server laeuft
29 797f9170 2002-11-10 alex pid=`./getpid.sh T-ngircd`
30 90ab7c7c 2002-09-20 alex [ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
31 c4d78a34 2002-09-09 alex
32 c4d78a34 2002-09-09 alex # -eof-