aboutsummaryrefslogtreecommitdiffstats
path: root/main/darkhttpd/darkhttpd.initd
blob: 42514fa650eb322f71274a03a1b04debb866508b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /sbin/openrc-run

description="darkhttpd web server"
command="/usr/bin/darkhttpd"
command_args="${document_root:-/var/www/localhost/htdocs} --chroot --daemon --uid darkhttpd --gid www-data --log /var/log/darkhttpd/access.log $darkhttpd_args"
procname="darkhttpd"
pidfile=""
stopsig="SIGTERM"

optional_arg() {
	if [ -n "$2" ]; then
		command_args="$command_args $1 $2"
	fi
}

start_pre() {
	optional_arg --addr "$addr"
	optional_arg --port "$port"
	optional_arg --mimetypes "$mimetypes"
}