blob: 47fc0877add84de78182fcd5c8a109c029d599a4 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001#!/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 start-stop-daemon --start -x "$DAEMON" -- $OPTS
23 echo "$NAME."
24 ;;
25 stop)
26 echo -n "Stopping $DESC: "
27 start-stop-daemon --stop -x "$DAEMON"
28 echo "$NAME."
29 ;;
30 restart|force-reload)
31 echo -n "Restarting $DESC: "
32 start-stop-daemon --stop -x "$DAEMON"
33 sleep 1
34 start-stop-daemon --start -x "$DAEMON" -- $OPTS
35 echo "$NAME."
36 ;;
37 *)
38 N=/etc/init.d/$NAME
39 echo "Usage: $N {start|stop|restart|force-reload}" >&2
40 exit 1
41 ;;
42esac
43
44exit 0