1 |
commit: 8414107dc7f3df35ab6c2fa0cddd40463fdc639a |
2 |
Author: Markos Chandras <hwoarang <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 2 16:58:59 2015 +0000 |
4 |
Commit: Markos Chandras <hwoarang <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 2 17:19:01 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8414107d |
7 |
|
8 |
www-servers/lighttpd: Improve server.pid-file detection in openrc init script. Bug #366811 |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
www-servers/lighttpd/files/lighttpd.confd | 4 ---- |
13 |
www-servers/lighttpd/files/lighttpd.initd | 9 ++++++--- |
14 |
2 files changed, 6 insertions(+), 7 deletions(-) |
15 |
|
16 |
diff --git a/www-servers/lighttpd/files/lighttpd.confd b/www-servers/lighttpd/files/lighttpd.confd |
17 |
index f3afb07..c7733de 100644 |
18 |
--- a/www-servers/lighttpd/files/lighttpd.confd |
19 |
+++ b/www-servers/lighttpd/files/lighttpd.confd |
20 |
@@ -6,7 +6,3 @@ |
21 |
|
22 |
# Location of the lighttpd configuration file |
23 |
LIGHTTPD_CONF="/etc/lighttpd/lighttpd.conf" |
24 |
- |
25 |
-# Location of the lighttpd pid file |
26 |
-LIGHTTPD_PID="$(/usr/bin/awk '/^server.pid-file/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})" |
27 |
- |
28 |
|
29 |
diff --git a/www-servers/lighttpd/files/lighttpd.initd b/www-servers/lighttpd/files/lighttpd.initd |
30 |
index 23c0983..8abe3ba 100644 |
31 |
--- a/www-servers/lighttpd/files/lighttpd.initd |
32 |
+++ b/www-servers/lighttpd/files/lighttpd.initd |
33 |
@@ -5,6 +5,8 @@ |
34 |
|
35 |
extra_started_commands="reload graceful" |
36 |
|
37 |
+LIGHTTPD_PID="$($(which lighttpd) -pf ${LIGHTTPD_CONF} | grep pid | cut -d '=' -f 2 | tr -d \\\" | tr -d [:space:])" |
38 |
+ |
39 |
depend() { |
40 |
need net |
41 |
use mysql logger spawn-fcgi ldap slapd netmount dns |
42 |
@@ -19,9 +21,10 @@ checkconfig() { |
43 |
fi |
44 |
|
45 |
if [ -z "${LIGHTTPD_PID}" ] ; then |
46 |
- ewarn "server.pid-file variable in ${LIGHTTPD_CONF}" |
47 |
- ewarn "is not set. Falling back to lighttpd.pid" |
48 |
- LIGHTTPD_PID="/run/lighttpd.pid" |
49 |
+ eerror "server.pid-file variable in ${LIGHTTPD_CONF}" |
50 |
+ eerror "is not set. Please set this variable properly" |
51 |
+ eerror "and try again" |
52 |
+ return 1 |
53 |
fi |
54 |
/usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null |
55 |
} |