From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/apache:master commit in: 2.2/init/
Date: Sat, 9 Nov 2013 11:41:01 +0000 (UTC) [thread overview]
Message-ID: <1383997184.e606bdae457d39634d3d03f780cbc091dfacbdbd.polynomial-c@gentoo> (raw)
commit: e606bdae457d39634d3d03f780cbc091dfacbdbd
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 9 11:39:44 2013 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Nov 9 11:39:44 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/apache.git;a=commit;h=e606bdae
apache2.initd: Init script now returns as failed when apache faisl to start.
---
2.2/init/apache2.initd | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/2.2/init/apache2.initd b/2.2/init/apache2.initd
index 249d3de..8cbb030 100755
--- a/2.2/init/apache2.initd
+++ b/2.2/init/apache2.initd
@@ -77,12 +77,13 @@ start() {
# Use start stop daemon to apply system limits #347301
start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start
- i=0
+ local i=0 retval=1
while [ ! -e "${PIDFILE}" ] && [ $i -lt ${TIMEOUT} ]; do
sleep 1 && i=$(expr $i + 1)
+ [ -e "${PIDFILE}" ] && retval=0
done
- eend $(test $i -lt ${TIMEOUT})
+ eend ${retval}
}
stop() {
@@ -101,13 +102,14 @@ stop() {
ebegin "Stopping ${SVCNAME}"
${APACHE2} ${APACHE2_OPTS} -k stop
- i=0
- while ( ! test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \
+ local i=0 retval=0
+ while ( test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \
&& [ $i -lt ${TIMEOUT} ]; do
sleep 1 && i=$(expr $i + 1)
done
+ [ -e "${PIDFILE}" ] && retval=1
- eend $(test $i -lt ${TIMEOUT})
+ eend ${retval}
}
reload() {
next reply other threads:[~2013-11-09 11:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-09 11:41 Lars Wendler [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-11-09 15:32 [gentoo-commits] proj/apache:master commit in: 2.2/init/ Lars Wendler
2013-11-09 15:32 Lars Wendler
2013-11-09 15:33 Lars Wendler
2013-11-09 15:33 Lars Wendler
2013-11-09 15:33 Lars Wendler
2013-11-09 15:36 Lars Wendler
2013-11-09 17:09 Lars Wendler
2014-05-14 13:56 Lars Wendler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383997184.e606bdae457d39634d3d03f780cbc091dfacbdbd.polynomial-c@gentoo \
--to=polynomial-c@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox