- #!/bin/sh
- INSTROOT=/opt/phttpd
- case $1 in
- 'start')
- if [ -x $INSTROOT/sbin/phttpd ]; then
- $INSTROOT/sbin/phttpd
- fi
- ;;
- 'stop')
- pid=`/usr/bin/ps -e|/usr/bin/egrep 'ackpfd'|/usr/bin/awk '{ print $1 }'`
- if [ "${pid}" != "" ]; then
- /usr/bin/kill ${pid}
- fi
- pid=`/usr/bin/ps -e|/usr/bin/egrep 'phttpd'|/usr/bin/awk '{ print $1 }'`
- if [ "${pid}" != "" ]; then
- /usr/bin/kill ${pid}
- fi
- ;;
- *)
- echo 'Usage: /etc/init.d/phttpd start|stop'
- ;;
- esac