From d8af651344cf39a488cda123e2d0a0a80cd3f78f Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Fri, 4 Jan 2019 13:42:46 +1100 Subject: [PATCH] darkhttpd: fix service, read from conf file The darkhttpd process would be backgrounded if /bin/sh does not support "&>" syntax. If /bin/sh does support "&>" the log file would be started afresh each time. Let the directory to be served and other options be set in a conf file. --- srcpkgs/darkhttpd/files/darkhttpd/run | 4 +++- srcpkgs/darkhttpd/template | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/srcpkgs/darkhttpd/files/darkhttpd/run b/srcpkgs/darkhttpd/files/darkhttpd/run index 5d417967de7..465456978b3 100755 --- a/srcpkgs/darkhttpd/files/darkhttpd/run +++ b/srcpkgs/darkhttpd/files/darkhttpd/run @@ -1,2 +1,4 @@ #!/bin/sh -exec darkhttpd /srv/www/darkhttpd --chroot --uid _darkhttpd --gid _darkhttpd --no-server-id &>/var/log/darkhttpd/darkhttpd.log +[ -r conf ] && . ./conf +: ${WWWDIR:=/srv/www/darkhttpd} +exec darkhttpd "${WWWDIR}" --chroot --uid _darkhttpd --gid _darkhttpd $OPTS 2>&1 >>/var/log/darkhttpd/darkhttpd.log diff --git a/srcpkgs/darkhttpd/template b/srcpkgs/darkhttpd/template index 34671e6909f..098f74a7d3c 100644 --- a/srcpkgs/darkhttpd/template +++ b/srcpkgs/darkhttpd/template @@ -1,7 +1,7 @@ # Template file for 'darkhttpd' pkgname=darkhttpd version=1.12 -revision=2 +revision=3 short_desc="Small and secure static webserver" maintainer="Andrea Brancaleoni " license="ISC"