2 # $Id: stop01.sh,v 1.3 2003-05-06 20:09:28 adam Exp $
3 # test start and stop of the server with -1
8 ../../index/zebraidx -l idx.log -c zebra1.cfg init || exit 1
10 #create a base to test on
11 ../../index/zebraidx -l idx.log -c zebra1.cfg update records || exit 1
13 #kill old server (if any)
14 test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`
18 echo "Starting server with -1 (one shot)..."
19 ../../index/zebrasrv -1 -c zebra1.cfg -l srv.log tcp:@:9901 &
22 echo " checking that it runs... "
23 test -f zebrasrv.pid || exit 1
24 PID=`cat zebrasrv.pid`
25 ps -p $PID |grep $PID >/dev/null || exit 1
27 echo " connecting to it..."
28 ../testclient localhost:9901 utah > log || exit 1
31 echo " checking that server does not run any more"
32 ps -p $PID | grep $PID >/dev/null && exit 1
35 rm -rf reg idx.log srv.log zebrasrv.pid