Files
operating-system/buildroot/package/darkhttpd/S50darkhttpd
Pascal Vizeli 41d3f59002 Update Buildroot to 2019.02.3 (#415)
* Update Buildroot to 2019-02.3

* Fix enter script

* Update ova_defconfig

* Fix network manager

* Remove runc patches

* Use same docker version

* Fix build

* Fix vmtools

* Fix depens

* Fix handling with tempfiles

* Fix permission handling

* Fix cp

* Cleanup

* Fix mounts
2019-06-27 11:58:50 +02:00

46 lines
921 B
Bash

#!/bin/sh
#
# Starts darkhttpd.
#
# Allow a few customizations from a config file
test -r /etc/default/darkhttpd && . /etc/default/darkhttpd
DARKHTTPD_PROG=/usr/sbin/darkhttpd
DARKHTTPD_PIDFILE=/var/run/darkhttpd.pid
DARKHTTPD_ARGS="${DARKHTTPD_ROOT:-/var/www} --log /var/log/darkhttpd.log $DARKHTTPD_FLAGS --chroot --uid nobody --gid www-data"
start() {
printf "Starting darkhttpd: "
start-stop-daemon -S -q -b -p $DARKHTTPD_PIDFILE -m --exec $DARKHTTPD_PROG -- $DARKHTTPD_ARGS
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping darkhttpd: "
start-stop-daemon -K -q -p $DARKHTTPD_PIDFILE
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?