3 # $Id: start-server.sh,v 1.11.2.1 2004/09/04 20:49:36 alex Exp $
5 [ -z "$srcdir" ] && srcdir=`dirname $0`
7 echo -n " starting server ..."
12 # check weather getpid.sh returns valid PIDs. If not, don't start up the
13 # test-server, because we won't be able to kill it at the end of the test.
14 ./getpid.sh sh > /dev/null 2>&1
16 echo " getpid.sh failed!"
20 # check if there is a test-server already running
21 ./getpid.sh T-ngircd > /dev/null 2>&1
23 echo " failure: test-server already running!"
27 # generate MOTD for test-server
28 echo "This is an ngIRCd Test Server" > ngircd-test.motd
30 # starting up test-server ...
31 ./T-ngircd -np -f ${srcdir}/ngircd-test.conf $* > ngircd-test.log 2>&1 &
34 # validate running test-server
35 pid=`./getpid.sh T-ngircd`
36 [ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1; r=$?
38 [ $r -eq 0 ] && echo " ok." || echo " failure!"