]> arthur.barton.de Git - ngircd-alex.git/blob - src/testsuite/start-server.sh
8eef8b47d2390a9d2bb0b27523d56b5fb41f86c8
[ngircd-alex.git] / src / testsuite / start-server.sh
1 #!/bin/sh
2 # ngIRCd Test Suite
3 # $Id: start-server.sh,v 1.7 2002/09/20 13:57:01 alex Exp $
4
5 echo "      starting server ..."
6
7 rm -rf logs
8
9 echo "This is an ngIRCd Test Server" > ngircd-test.motd
10
11 ./ngircd-TEST -np -f ${srcdir}/ngircd-test.conf > ngircd-test.log 2>&1 &
12 sleep 1
13
14 PS_FLAGS=-f; PS_PIDCOL=2
15 ps $PS_FLAGS > /dev/null 2>&1
16 if [ $? -ne 0 ]; then PS_FLAGS=a; PS_PIDCOL=1; fi
17
18 ps $PS_FLAGS > procs.tmp
19 pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`
20 [ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
21
22 # -eof-