4 # Required-Start: $local_fs $remote_fs $network $syslog
5 # Required-Stop: $local_fs $remote_fs $network $syslog
6 # Default-Start: 2 3 4 5
8 # Short-Description: The ashd HTTP server
13 . /lib/lsb/init-functions
15 PATH=/usr/local/bin:/usr/local/sbin:$PATH
16 HTPARSER="$(which htparser || true)"
17 PIDFILE=/var/run/ashd.pid
19 ROOTSPEC="dirplex /srv/www"
20 [ -r /etc/default/locale ] && . /etc/default/locale
21 [ -r /etc/default/ashd ] && . /etc/default/ashd
22 [ -x "$HTPARSER" ] || exit 0
26 log_daemon_msg "Starting HTTP server" "ashd"
27 start-stop-daemon -S -p "$PIDFILE" -qx "$HTPARSER" -- -Sf -p "$PIDFILE" -u nobody -r /var/tmp $PORTSPEC -- $ROOTSPEC
32 log_daemon_msg "Stopping HTTP server" "ashd"
33 start-stop-daemon -K -p "$PIDFILE" -qx "$HTPARSER"