stop01.sh

来自「harvest是一个下载html网页得机器人」· Shell 代码 · 共 36 行

SH
36
字号
#!/bin/sh# $Id: stop01.sh,v 1.5 2003/05/24 22:34:48 adam Exp $# test start and stop of the server with -1LOG=stop01.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 -1 (one shot)..." >>$LOG../../index/zebrasrv -1 -c zebra1.cfg -l $LOG tcp:@:9901 &sleep 1echo "  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 server does not run any more" >>$LOGps -p $PID | grep $PID >/dev/null && exit 1# clean uprm -rf reg zebrasrv.pid

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?