summaryrefslogtreecommitdiffstats
path: root/main/lighttpd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-05-03 06:54:53 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-05-03 06:54:53 +0000
commitbf277d94c5aab5af8fbe8a4e175379e6f2682245 (patch)
treee0093c387cc7e5948c3b112d0a48d80bb3c58c50 /main/lighttpd
parent8d571bb611a8909d72cf6debe552533281571735 (diff)
downloadaports-bf277d94c5aab5af8fbe8a4e175379e6f2682245.tar.bz2
aports-bf277d94c5aab5af8fbe8a4e175379e6f2682245.tar.xz
main/lighttpd: set /var/{run,log}/lighttpd permission on start
Needed when server.user and server.group is not set to default value and we run from RAM. fixes #606
Diffstat (limited to 'main/lighttpd')
-rw-r--r--main/lighttpd/APKBUILD4
-rw-r--r--main/lighttpd/lighttpd.initd8
2 files changed, 10 insertions, 2 deletions
diff --git a/main/lighttpd/APKBUILD b/main/lighttpd/APKBUILD
index e5917ba62..19ffdc028 100644
--- a/main/lighttpd/APKBUILD
+++ b/main/lighttpd/APKBUILD
@@ -2,7 +2,7 @@
pkgname=lighttpd
pkgver=1.4.28
_streamver=2.2.0
-pkgrel=6
+pkgrel=7
pkgdesc="a secure, fast, compliant and very flexible web-server"
url="http://www.lighttpd.net/"
arch="all"
@@ -105,7 +105,7 @@ h264_streaming() {
md5sums="586eb535d31ac299652495b058dd87c4 lighttpd-1.4.28.tar.bz2
ac37885c881a058194405232e7737a7a lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz
-36c4ddbc266017dc193fcb0cdd1d84e1 lighttpd.initd
+e37770e4eed20390806a2420a3970fcd lighttpd.initd
0dede109282bfe685bdec6b35f0e4b6b lighttpd.confd
ad091c9157134890499f26d170352c9f lighttpd.logrotate
1d925aed297ec4541fb230dd19e11bc1 spawn-fcgi.confd
diff --git a/main/lighttpd/lighttpd.initd b/main/lighttpd/lighttpd.initd
index 6b02bdf43..a0bcc0110 100644
--- a/main/lighttpd/lighttpd.initd
+++ b/main/lighttpd/lighttpd.initd
@@ -11,6 +11,11 @@ depend() {
after famd firewall sshd
}
+_confopt() {
+ /usr/sbin/lighttpd -p -f ${LIGHTTPD_CONF} | awk -F = \
+ "/$1/"' {sub(/^ *"/, "", $2); sub(/" */, "", $2); print $2}'
+}
+
checkconfig() {
if [ ! -f "${LIGHTTPD_CONF}" ] ; then
ewarn "${LIGHTTPD_CONF} does not exist."
@@ -22,6 +27,9 @@ checkconfig() {
start() {
checkconfig || return 1
+ local _user=$(_confopt server.user)
+ local _group=$(_confopt server.group)
+ chown $_user:$_group /var/*/lighttpd
ebegin "Starting lighttpd"
start-stop-daemon --start --quiet --exec /usr/sbin/lighttpd \