3 # $Id: start-server.sh,v 1.14 2004/09/06 22:04:06 alex Exp $
5 [ -z "$srcdir" ] && srcdir=`dirname $0`
8 . ${srcdir}/functions.inc
10 echo_n " starting server ..."
15 # check weather getpid.sh returns valid PIDs. If not, don't start up the
16 # test-server, because we won't be able to kill it at the end of the test.
17 ./getpid.sh sh > /dev/null 2>&1
19 echo " getpid.sh failed!"
23 # check if there is a test-server already running
24 ./getpid.sh T-ngircd > /dev/null 2>&1
26 echo " failure: test-server already running!"
30 # generate MOTD for test-server
31 echo "This is an ngIRCd Test Server" > ngircd-test.motd
33 # starting up test-server ...
34 ./T-ngircd -np -f ${srcdir}/ngircd-test.conf $* > ngircd-test.log 2>&1 &
37 # validate running test-server
38 pid=`./getpid.sh T-ngircd`
39 [ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1; r=$?
41 [ $r -eq 0 ] && echo " ok." || echo " failure!"