From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8C3761399E1 for ; Wed, 2 Sep 2015 17:19:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 012161418A; Wed, 2 Sep 2015 17:19:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 870A81418A for ; Wed, 2 Sep 2015 17:19:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 77D8F340901 for ; Wed, 2 Sep 2015 17:19:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0325C164 for ; Wed, 2 Sep 2015 17:19:44 +0000 (UTC) From: "Markos Chandras" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Markos Chandras" Message-ID: <1441214341.8414107dc7f3df35ab6c2fa0cddd40463fdc639a.hwoarang@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/lighttpd/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-servers/lighttpd/files/lighttpd.confd www-servers/lighttpd/files/lighttpd.initd X-VCS-Directories: www-servers/lighttpd/files/ X-VCS-Committer: hwoarang X-VCS-Committer-Name: Markos Chandras X-VCS-Revision: 8414107dc7f3df35ab6c2fa0cddd40463fdc639a X-VCS-Branch: master Date: Wed, 2 Sep 2015 17:19:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 66691c2c-143b-4cdd-87ce-db95e21c8efa X-Archives-Hash: a1095ece9d113e7609bf974ae2a3adb9 commit: 8414107dc7f3df35ab6c2fa0cddd40463fdc639a Author: Markos Chandras gentoo org> AuthorDate: Wed Sep 2 16:58:59 2015 +0000 Commit: Markos Chandras gentoo org> CommitDate: Wed Sep 2 17:19:01 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8414107d www-servers/lighttpd: Improve server.pid-file detection in openrc init script. Bug #366811 Package-Manager: portage-2.2.20.1 www-servers/lighttpd/files/lighttpd.confd | 4 ---- www-servers/lighttpd/files/lighttpd.initd | 9 ++++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/www-servers/lighttpd/files/lighttpd.confd b/www-servers/lighttpd/files/lighttpd.confd index f3afb07..c7733de 100644 --- a/www-servers/lighttpd/files/lighttpd.confd +++ b/www-servers/lighttpd/files/lighttpd.confd @@ -6,7 +6,3 @@ # Location of the lighttpd configuration file LIGHTTPD_CONF="/etc/lighttpd/lighttpd.conf" - -# Location of the lighttpd pid file -LIGHTTPD_PID="$(/usr/bin/awk '/^server.pid-file/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})" - diff --git a/www-servers/lighttpd/files/lighttpd.initd b/www-servers/lighttpd/files/lighttpd.initd index 23c0983..8abe3ba 100644 --- a/www-servers/lighttpd/files/lighttpd.initd +++ b/www-servers/lighttpd/files/lighttpd.initd @@ -5,6 +5,8 @@ extra_started_commands="reload graceful" +LIGHTTPD_PID="$($(which lighttpd) -pf ${LIGHTTPD_CONF} | grep pid | cut -d '=' -f 2 | tr -d \\\" | tr -d [:space:])" + depend() { need net use mysql logger spawn-fcgi ldap slapd netmount dns @@ -19,9 +21,10 @@ checkconfig() { 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="/run/lighttpd.pid" + eerror "server.pid-file variable in ${LIGHTTPD_CONF}" + eerror "is not set. Please set this variable properly" + eerror "and try again" + return 1 fi /usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null }