forked from pool/hiawatha
55 lines
1010 B
Bash
55 lines
1010 B
Bash
#!/bin/sh
|
|
# hiawatha: Starts the hiawatha web server
|
|
#
|
|
# description: Hiawatha web server
|
|
# processname: hiawatha
|
|
|
|
### BEGIN INIT INFO
|
|
# Provides: hiawatha-httpd http-server
|
|
# Required-Start: $network
|
|
# Required-Stop: $network
|
|
# Should-Start: $remote_fs hiawatha-fastcgi
|
|
# Should-Stop: hiawatha-fastcgi
|
|
# Default-Start: 3 5
|
|
# Default-Stop: 0 1 2 6
|
|
# Short-Description: Hiawatha web server
|
|
# Description: Hiawatha web server
|
|
### END INIT INFO
|
|
|
|
. /etc/rc.status
|
|
|
|
HIAWATHABIN=/usr/sbin/hiawatha
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
echo -n "Starting hiawatha daemon"
|
|
startproc -f $HIAWATHABIN
|
|
rc_status -v
|
|
;;
|
|
|
|
stop)
|
|
echo -n "Stopping hiawatha daemon"
|
|
killproc -TERM $HIAWATHABIN
|
|
rc_status -v
|
|
;;
|
|
|
|
status)
|
|
echo -n "Checking for hiawatha"
|
|
checkproc $HIAWATHABIN
|
|
rc_status -v
|
|
;;
|
|
|
|
restart)
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: $0 (start|stop|restart|status)"
|
|
exit 1
|
|
;;
|
|
|
|
esac
|
|
rc_exit
|