From d5fcf6071a5f166785122ef7b72630ec5f043a3c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 1 May 2016 10:37:44 +0200 Subject: [PATCH] lighttpd: switch webroot to /srv/www/lighttpd; user to _lighttpd; create dirs in service. --- srcpkgs/lighttpd/files/lighttpd.conf | 6 +++--- srcpkgs/lighttpd/files/lighttpd/run | 14 ++++++++++++++ srcpkgs/lighttpd/template | 9 +++------ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/srcpkgs/lighttpd/files/lighttpd.conf b/srcpkgs/lighttpd/files/lighttpd.conf index 680f757ef40..6e7a6cc6c1d 100644 --- a/srcpkgs/lighttpd/files/lighttpd.conf +++ b/srcpkgs/lighttpd/files/lighttpd.conf @@ -3,9 +3,9 @@ # and http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions server.port = 80 -server.username = "httpd" -server.groupname = "httpd" -server.document-root = "/srv/httpd" +server.username = "_lighttpd" +server.groupname = "_lighttpd" +server.document-root = "/srv/www/lighttpd" server.errorlog = "/var/log/lighttpd/error.log" dir-listing.activate = "enable" index-file.names = ( "index.html" ) diff --git a/srcpkgs/lighttpd/files/lighttpd/run b/srcpkgs/lighttpd/files/lighttpd/run index b1d0bb000f7..36e7a92673b 100755 --- a/srcpkgs/lighttpd/files/lighttpd/run +++ b/srcpkgs/lighttpd/files/lighttpd/run @@ -1,2 +1,16 @@ #!/bin/sh +[ -s conf ] && . ./conf + +: ${ROOTDIR:=/srv/www/lighttpd} +: ${LOGDIR:=/var/log/lighttpd} + +if [ ! -d $ROOTDIR ]; then + mkdir -p $ROOTDIR + chown _lighttpd:_lighttpd $ROOTDIR +fi +if [ ! -d $LOGDIR ]; then + mkdir -p $LOGDIR + chown _lighttpd:_lighttpd $LOGDIR +fi + exec lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf diff --git a/srcpkgs/lighttpd/template b/srcpkgs/lighttpd/template index 5d7f9fbcae1..96267e87007 100644 --- a/srcpkgs/lighttpd/template +++ b/srcpkgs/lighttpd/template @@ -1,15 +1,12 @@ # Template file for 'lighttpd' pkgname=lighttpd version=1.4.39 -revision=3 +revision=4 makedepends="libmysqlclient-devel lua-devel libxml2-devel sqlite-devel gdbm-devel pcre-devel libressl-devel fcgi-devel" hostmakedepends="automake pkg-config pcre-devel libtool" conf_files="/etc/lighttpd/lighttpd.conf" -system_accounts="httpd" -lighttpd_homedir="/src/httpd" -make_dirs=" - /srv/www 0755 root root - /var/log/lighttpd 0750 httpd httpd" +system_accounts="_${pkgname}" +_lighttpd_homedir="/srv/www/${pkgname}" short_desc="A secure, fast, compliant and very flexible web-server" maintainer="Enno Boland " license="2-clause-BSD"