mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-23 01:21:46 +01:00
24 lines
591 B
Plaintext
24 lines
591 B
Plaintext
#! /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 $darkhttpd_args"
|
|
procname="darkhttpd"
|
|
pidfile=""
|
|
stopsig="SIGTERM"
|
|
|
|
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"
|
|
}
|
|
|