ruby: bump version to 2.4.1
[buildroot-gz.git] / package / darkhttpd / S50darkhttpd
blob913439f5a5898950c10ea28d04166dda7d9becb1
1 #!/bin/sh
3 # Starts darkhttpd.
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"
13 start() {
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"
19 stop() {
20 printf "Stopping darkhttpd: "
21 start-stop-daemon -K -q -p $DARKHTTPD_PIDFILE
22 [ $? = 0 ] && echo "OK" || echo "FAIL"
25 restart() {
26 stop
27 start
30 case "$1" in
31 start)
32 start
34 stop)
35 stop
37 restart|reload)
38 restart
41 echo "Usage: $0 {start|stop|restart}"
42 exit 1
43 esac
45 exit $?