1#!/bin/sh 2 3### BEGIN INIT INFO 4# Provides: hiawatha httpd httpd-cgi 5# Required-Start: $syslog $network $remote_fs 6# Required-Stop: $syslog $network $remote_fs 7# Default-Start: 2 3 4 5 8# Default-Stop: 0 1 6 9# Short-Description: Hiawatha webserver 10# Description: Hiawatha, a secure and advanced webserver. 11### END INIT INFO 12 13PATH=/sbin:/bin:/usr/sbin:/usr/bin 14DAEMON=sed_sbin_path/hiawatha 15NAME=hiawatha 16DESC="Hiawatha Web Server" 17OPTS="" 18 19case "$1" in 20 start) 21 echo -n "Starting $DESC: " 22 mkdir -p /var/log/hiawatha &> /dev/null 23 start-stop-daemon --start -x "$DAEMON" -- $OPTS 24 echo "$NAME." 25 ;; 26 stop) 27 echo -n "Stopping $DESC: " 28 start-stop-daemon --stop -x "$DAEMON" 29 echo "$NAME." 30 ;; 31 restart|force-reload) 32 echo -n "Restarting $DESC: " 33 start-stop-daemon --stop -x "$DAEMON" 34 sleep 1 35 start-stop-daemon --start -x "$DAEMON" -- $OPTS 36 echo "$NAME." 37 ;; 38 *) 39 N=/etc/init.d/$NAME 40 echo "Usage: $N {start|stop|restart|force-reload}" >&2 41 exit 1 42 ;; 43esac 44 45exit 0 46