4 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
5 DAEMON=/usr/sbin/mini_httpd
8 # Additional options that are passed to the Daemon.
9 DAEMON_OPTS="-C /etc/mini-httpd.conf"
11 test -x $DAEMON || exit 0
13 # Include mini-httpd defaults if available
14 if [ -f /etc/default/mini-httpd ]
16 . /etc/default/mini-httpd
23 echo -n "Starting $DESC: "
24 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
25 --exec $DAEMON -- $DAEMON_OPTS
30 echo -n "Stopping $DESC: "
32 if [ -e /var/run/$NAME.pid ]
34 PID=`cat /var/run/$NAME.pid`
37 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
39 # we need to remove the pidfile manually
40 if [ -e /var/run/$NAME.pid ]
42 rm -f /var/run/$NAME.pid
50 echo -n "Restarting $DESC: "
53 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
54 --exec $DAEMON -- $DAEMON_OPTS
57 start-stop-daemon --start --quiet --pidfile \
58 /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
64 echo "Usage: $N {start|stop|restart|force-reload}" >&2