aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-01-19 09:37:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-01-19 09:48:15 +0000
commit722046e8a8f9861802c82e0494ab019f16d06291 (patch)
tree33808381240b6c5a1b7278a231883b9ed23c307f /main
parent4b33a80ba058c8f3513aa3882d262502a722e24e (diff)
downloadaports-722046e8a8f9861802c82e0494ab019f16d06291.tar.bz2
aports-722046e8a8f9861802c82e0494ab019f16d06291.tar.xz
main/lighttpd: fix init.d script
ref #943
Diffstat (limited to 'main')
-rw-r--r--main/lighttpd/APKBUILD4
-rw-r--r--main/lighttpd/lighttpd.initd30
2 files changed, 17 insertions, 17 deletions
diff --git a/main/lighttpd/APKBUILD b/main/lighttpd/APKBUILD
index b4a4d5ac8d..11d0f3180a 100644
--- a/main/lighttpd/APKBUILD
+++ b/main/lighttpd/APKBUILD
@@ -2,7 +2,7 @@
pkgname=lighttpd
pkgver=1.4.30
_streamver=2.2.0
-pkgrel=0
+pkgrel=1
pkgdesc="a secure, fast, compliant and very flexible web-server"
url="http://www.lighttpd.net/"
arch="all"
@@ -128,7 +128,7 @@ mod_webdav() {
md5sums="63f9df52dcae0ab5689a95c99c54e48a lighttpd-1.4.30.tar.bz2
ac37885c881a058194405232e7737a7a lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz
-e37770e4eed20390806a2420a3970fcd lighttpd.initd
+aa1f130f66607615143b2b497c55b177 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 a0bcc0110e..90aa82f1b8 100644
--- a/main/lighttpd/lighttpd.initd
+++ b/main/lighttpd/lighttpd.initd
@@ -1,19 +1,16 @@
#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/lighttpd.initd-1.4.13-r3,v 1.2 2007/10/12 20:54:46 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/lighttpd.initd,v 1.21 2012/01/08 20:45:46 hwoarang Exp $
-opts="reload graceful"
+extra_started_commands="reload graceful"
depend() {
need net
- use mysql logger spawn-fcgi ldap slapd
- after famd firewall sshd
-}
-
-_confopt() {
- /usr/sbin/lighttpd -p -f ${LIGHTTPD_CONF} | awk -F = \
- "/$1/"' {sub(/^ *"/, "", $2); sub(/" */, "", $2); print $2}'
+ use mysql logger spawn-fcgi ldap slapd netmount dns
+ after firewall
+ after famd
+ after sshd
}
checkconfig() {
@@ -22,14 +19,17 @@ checkconfig() {
return 1
fi
+ if [ -z "${LIGHTTPD_PID}" ] ; then
+ ewarn "server.pid-file variable in ${LIGHTTPD_CONF}"
+ ewarn "is not set. Falling back to lighttpd.pid"
+ LIGHTTPD_PID="/var/run/lighttpd.pid"
+ fi
/usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null
}
start() {
checkconfig || return 1
- local _user=$(_confopt server.user)
- local _group=$(_confopt server.group)
- chown $_user:$_group /var/*/lighttpd
+ checkpath -d -q -m 0750 -o lighttpd:lighttpd /var/run/lighttpd/
ebegin "Starting lighttpd"
start-stop-daemon --start --quiet --exec /usr/sbin/lighttpd \
@@ -52,7 +52,7 @@ reload() {
checkconfig || return 1
ebegin "Re-opening lighttpd log files"
- start-stop-daemon --stop --oknodo --quiet --pidfile "${LIGHTTPD_PID}" \
+ start-stop-daemon --quiet --pidfile "${LIGHTTPD_PID}" \
--signal HUP
eend $?
}
@@ -65,7 +65,7 @@ graceful() {
checkconfig || return 1
ebegin "Gracefully stopping lighttpd"
- start-stop-daemon --stop --oknodo --quiet --pidfile "${LIGHTTPD_PID}" \
+ start-stop-daemon --quiet --pidfile "${LIGHTTPD_PID}" \
--signal INT
if eend $? ; then
rm -f "${LIGHTTPD_PID}"