summaryrefslogtreecommitdiffstats
path: root/httpd-2.4.3-apctl-systemd.patch
diff options
context:
space:
mode:
authorJoe Orton <jorton@redhat.com>2016-04-07 14:07:25 +0100
committerJoe Orton <jorton@redhat.com>2016-04-07 14:07:25 +0100
commit37b82598ea6144cabe9fe6466d1fc9e165f19344 (patch)
treeb8f70ffe6bbdcfb17a797cb5c7e7de86c9cc04ef /httpd-2.4.3-apctl-systemd.patch
parenta4064261ead64f6b2109d8b15145072c9c3d1e67 (diff)
downloadhttpd-37b82598ea6144cabe9fe6466d1fc9e165f19344.tar.gz
httpd-37b82598ea6144cabe9fe6466d1fc9e165f19344.tar.xz
httpd-37b82598ea6144cabe9fe6466d1fc9e165f19344.zip
have "apachectl graceful" start httpd if not running, per man page
Diffstat (limited to 'httpd-2.4.3-apctl-systemd.patch')
-rw-r--r--httpd-2.4.3-apctl-systemd.patch20
1 files changed, 13 insertions, 7 deletions
diff --git a/httpd-2.4.3-apctl-systemd.patch b/httpd-2.4.3-apctl-systemd.patch
index 5823aee..c6bf5da 100644
--- a/httpd-2.4.3-apctl-systemd.patch
+++ b/httpd-2.4.3-apctl-systemd.patch
@@ -1,11 +1,13 @@
+Make apachectl run via systemctl.
+
+Note: "apachectl graceful" is documented to start httpd if not running.
+
Upstream-Status: vendor specific patch
-diff --git a/support/apachectl.in b/support/apachectl.in
-index c6ac3ea..2599386 100644
---- a/support/apachectl.in
-+++ b/support/apachectl.in
-@@ -100,9 +100,24 @@ fi
+--- httpd-2.4.18/support/apachectl.in.apctlsystemd
++++ httpd-2.4.18/support/apachectl.in
+@@ -100,9 +100,28 @@ fi
ERROR=$?
}
@@ -24,7 +26,11 @@ index c6ac3ea..2599386 100644
+ ERROR=$?
+ ;;
+graceful)
-+ /usr/bin/systemctl reload httpd.service
++ if /usr/bin/systemctl -q is-active httpd.service; then
++ /usr/bin/systemctl reload httpd.service
++ else
++ /usr/bin/systemctl start httpd.service
++ fi
+ ERROR=$?
+ ;;
+graceful-stop)
@@ -32,7 +38,7 @@ index c6ac3ea..2599386 100644
ERROR=$?
;;
startssl|sslstart|start-SSL)
-@@ -114,10 +129,6 @@ startssl|sslstart|start-SSL)
+@@ -114,10 +133,6 @@ startssl|sslstart|start-SSL)
configtest)
testconfig
;;