git.schokokeks.org
Repositories
Help
Report an Issue
keks-overlay.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
697c807
Branches
Tags
master
keks-overlay.git
www-servers
apache
files
gentoo-apache-2.2.23-initd_fixups.patch
re-do apache
Hanno Böck
commited
697c807
at 2014-05-04 11:45:42
gentoo-apache-2.2.23-initd_fixups.patch
Blame
History
Raw
--- gentoo-apache-2.2.23/init/apache2.initd +++ gentoo-apache-2.2.23/init/apache2.initd @@ -77,12 +77,16 @@ # Use start stop daemon to apply system limits #347301 start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start - i=0 - while [ ! -e "${PIDFILE}" ] && [ $i -lt ${TIMEOUT} ]; do + local i=0 retval=1 + while [ $i -lt ${TIMEOUT} ] ; do + if [ -e "${PIDFILE}" ] ; then + retval=0 + break + fi sleep 1 && i=$(expr $i + 1) done - eend $(test $i -lt ${TIMEOUT}) + eend ${retval} } stop() { @@ -101,13 +105,14 @@ 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() {