From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/apache:master commit in: 2.4/scripts/
Date: Thu, 15 Mar 2018 10:11:18 +0000 (UTC) [thread overview]
Message-ID: <1521108578.9e3d349cc1ee14e91d377b6a38c786ac4b153fe5.polynomial-c@gentoo> (raw)
commit: 9e3d349cc1ee14e91d377b6a38c786ac4b153fe5
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 15 10:07:38 2018 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 15 10:09:38 2018 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=9e3d349c
2.4/scripts/apache2ctl: Pass commands to the apache daemon.
Gentoo-Bug: https://bugs.gentoo.org/634414
Thanks-to: Joona Hoikkala <joona <AT> kuori.org>
Thanks-to: Andrey Falko <Ma3oxuct <AT> gmail.com>
2.4/scripts/apache2ctl | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/2.4/scripts/apache2ctl b/2.4/scripts/apache2ctl
old mode 100755
new mode 100644
index eff10b5..2c7c699
--- a/2.4/scripts/apache2ctl
+++ b/2.4/scripts/apache2ctl
@@ -1,2 +1,25 @@
#!/bin/sh
-exec /etc/init.d/apache2 "$@"
+
+APACHE2="/usr/sbin/apache2"
+APACHE_OPTS=""
+APACHE_RC_CONF="/etc/conf.d/apache2"
+# List of init script verbs that should be passed forward
+RC_VERBS="start stop restart checkconfd configtest modules virtualhosts configdump fullstatus graceful gracefulstop reload"
+
+load_rc_config() {
+ [ -f "${APACHE_RC_CONF}" ] || return 1
+ eval "export $(grep '^[[:space:]]*APACHE2_OPTS' ${APACHE_RC_CONF})"
+ eval $(grep '^[[:space:]]*SERVERROOT' ${APACHE_RC_CONF})
+ eval $(grep '^[[:space:]]*CONFIGFILE' ${APACHE_RC_CONF})
+ export SERVERROOT="${SERVERROOT:-/usr/@LIBDIR@/apache2}"
+ export CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
+}
+
+# If first parameter is a verb defined in $RC_VERBS, pass the command to init script.
+# In other cases, compile command line and run the command on apache binary.
+if [ "${RC_VERBS}" =~ "${1}" ] ; then
+ exec /etc/init.d/apache2 "${@}"
+else
+ load_rc_config || exit 1
+ ${APACHE2} ${APACHE2_OPTS} -d ${SERVERROOT} -f ${CONFIGFILE} "${@}"
+fi
next reply other threads:[~2018-03-15 10:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 10:11 Lars Wendler [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-03-23 16:22 [gentoo-commits] proj/apache:master commit in: 2.4/scripts/ Lars Wendler
2019-02-26 15:42 Lars Wendler
2019-02-26 15:42 Lars Wendler
2019-04-02 8:39 Lars Wendler
2019-04-02 8:39 Lars Wendler
2019-04-28 10:58 Lars Wendler
2021-02-12 14:28 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=1521108578.9e3d349cc1ee14e91d377b6a38c786ac4b153fe5.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