blob: dc23c6e621421eeb422ee34845230efa8cdeb226 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#! /sbin/openrc-run
supervisor=supervise-daemon
name="darkhttpd web server"
description="Simple, single-threaded, static content webserver"
command="/usr/bin/darkhttpd"
command_args="${document_root:-/var/www/localhost/htdocs} --chroot --daemon --uid darkhttpd --gid www-data $darkhttpd_args"
optional_arg() {
if [ -n "$2" ]; then
command_args="$command_args $1 $2"
fi
}
start_pre() {
checkpath --directory --owner darkhttpd "${logdir:-/var/log/$SVCNAME}"
optional_arg --log "${logdir:-/var/log/$SVCNAME}"/access.log
optional_arg --addr "$addr"
optional_arg --port "$port"
optional_arg --mimetypes "$mimetypes"
}
|