blob: 7427fcb900bd8d0f870ee9ed3e945899de224ea4 [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: "
Patrick Williamsddad1a12017-02-23 20:36:32 -060022 mkdir -p /var/log/hiawatha &> /dev/null
Patrick Williamsb48b7b42016-08-17 15:04:38 -050023 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