esac
# spaw-php.sh php-cgi 启动脚本
#!/bin/sh
dir=`dirname $0`
PID_FILE=/home/work/htdocs/spaw-php.pid
PHP_FCGI="/home/work/php/bin/php-cgi -f /home/work/htdocs/php.ini"
case "$1" in
'start')
spawn-fcgi -C 3 -p 30000 -f "$PHP_FCGI" -P $PID_FILE
;;
'stop')
kill `cat $PID_FILE`
;;
'restart')
kill `cat $PID_FILE`
spawn-fcgi -C 3 -p 30000 -f "$PHP_FCGI" -P $PID_FILE
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac