2002-09-09 12:16:24 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# ngIRCd Test Suite
|
2002-09-20 15:57:01 +02:00
|
|
|
# $Id: start-server.sh,v 1.7 2002/09/20 13:57:01 alex Exp $
|
2002-09-09 12:16:24 +02:00
|
|
|
|
|
|
|
echo " starting server ..."
|
|
|
|
|
2002-09-12 04:27:30 +02:00
|
|
|
rm -rf logs
|
|
|
|
|
2002-09-09 12:16:24 +02:00
|
|
|
echo "This is an ngIRCd Test Server" > ngircd-test.motd
|
|
|
|
|
2002-09-12 04:27:30 +02:00
|
|
|
./ngircd-TEST -np -f ${srcdir}/ngircd-test.conf > ngircd-test.log 2>&1 &
|
2002-09-09 12:16:24 +02:00
|
|
|
sleep 1
|
|
|
|
|
2002-09-18 22:58:56 +02:00
|
|
|
PS_FLAGS=-f; PS_PIDCOL=2
|
|
|
|
ps $PS_FLAGS > /dev/null 2>&1
|
|
|
|
if [ $? -ne 0 ]; then PS_FLAGS=a; PS_PIDCOL=1; fi
|
2002-09-16 11:53:16 +02:00
|
|
|
|
|
|
|
ps $PS_FLAGS > procs.tmp
|
|
|
|
pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`
|
2002-09-20 15:57:01 +02:00
|
|
|
[ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
|
2002-09-09 12:16:24 +02:00
|
|
|
|
|
|
|
# -eof-
|