diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-11-27 10:03:48 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-11-27 10:05:22 +0100 |
commit | 73233fdad1a70afa9ab3cb07ce5ecf451742ba11 (patch) | |
tree | f6b89ba9175bb35a0d9801e8c300024d4c871d38 /main/darkhttpd/darkhttpd.initd | |
parent | f37e88eab8c001de8fc9d1a233bfe43d6d9f18dc (diff) | |
download | aports-73233fdad1a70afa9ab3cb07ce5ecf451742ba11.tar.bz2 aports-73233fdad1a70afa9ab3cb07ce5ecf451742ba11.tar.xz |
main/darkhttpd: add logrotate script and support for args
we add support for following config seettings in conf.d:
addr: set listen address
port: set lisetn port
mimetypes: set file with mimetypes
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" +} |