6 # Allow a few customizations from a config file
7 test -r /etc
/default
/darkhttpd
&& .
/etc
/default
/darkhttpd
9 DARKHTTPD_PROG
=/usr
/sbin
/darkhttpd
10 DARKHTTPD_PIDFILE
=/var
/run
/darkhttpd.pid
11 DARKHTTPD_ARGS
="${DARKHTTPD_ROOT:-/var/www} --log /var/log/darkhttpd.log $DARKHTTPD_FLAGS --chroot --uid nobody --gid www-data"
14 printf "Starting darkhttpd: "
15 start-stop-daemon
-S -q -b -p $DARKHTTPD_PIDFILE -m --exec $DARKHTTPD_PROG -- $DARKHTTPD_ARGS
16 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
20 printf "Stopping darkhttpd: "
21 start-stop-daemon
-K -q -p $DARKHTTPD_PIDFILE
22 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
41 echo "Usage: $0 {start|stop|restart}"