diff options
Diffstat (limited to 'main/darkhttpd/darkhttpd.initd')
-rw-r--r-- | main/darkhttpd/darkhttpd.initd | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/main/darkhttpd/darkhttpd.initd b/main/darkhttpd/darkhttpd.initd index a7efb16605..713a6629b5 100644 --- a/main/darkhttpd/darkhttpd.initd +++ b/main/darkhttpd/darkhttpd.initd @@ -2,7 +2,19 @@ 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" +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" +} |