Blame


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