📄 stop03.sh
字号:
#!/bin/sh# $Id: stop03.sh,v 1.6 2003/09/24 11:45:44 adam Exp $# test start and stop of the threaded server (-T)LOG=stop03.logrm -f $LOGecho "initializing" >>$LOGmkdir -p reg../../index/zebraidx -l $LOG -c zebra1.cfg init || exit 1#create a base to test on../../index/zebraidx -l $LOG -c zebra1.cfg update records || exit 1#kill old server (if any)test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`echo "Starting server with -T (threaded)..." >>$LOG( ../../index/zebrasrv -T -c zebra1.cfg -l $LOG tcp:@:9901 2>out || echo "server failed with $?" > $LOG)&sleep 1if grep 'not available' out >/dev/null; then test -f zebrasrv.pid && rm zebrasrv.pid exit 0fiecho " checking that it runs... " >>$LOGtest -f zebrasrv.pid || exit 1PID=`cat zebrasrv.pid`ps -p $PID | grep $PID >/dev/null || exit 1echo " connecting to it..." >>$LOG../api/testclient localhost:9901 utah >>$LOG || exit 1sleep 1echo " checking that it still runs..." >>$LOGps -p $PID >/dev/null || exit 1echo " connecting again, with a delay..." >>$LOG../api/testclient localhost:9901 utah 5 >>$LOG &sleep 1 # let the client connect echo " killing it..." >>$LOGkill $PIDsleep 1echo " checking that it is dead" >>$LOGps -p $PID | grep $PID >/dev/null && exit 1# clean uprm -rf reg zebrasrv.pid
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -