Blame SOURCES/httpd-2.4.3-apctl-systemd.patch

af9b8b
3fd4d8
Make apachectl run via systemctl.
3fd4d8
3fd4d8
Note: "apachectl graceful" is documented to start httpd if not running.
3fd4d8
af9b8b
Upstream-Status: vendor specific patch
af9b8b
f0c688
--- httpd-2.4.18/support/apachectl.in.apctlsystemd
f0c688
+++ httpd-2.4.18/support/apachectl.in
f0c688
@@ -100,9 +100,28 @@ fi
af9b8b
 ERROR=$?
af9b8b
 }
af9b8b
 
af9b8b
+if [ "x$2" != "x" ] ; then
af9b8b
+    echo Passing arguments to httpd using apachectl is no longer supported.
af9b8b
+    echo You can only start/stop/restart httpd using this script.
af9b8b
+    echo If you want to pass extra arguments to httpd, edit the
af9b8b
+    echo /etc/sysconfig/httpd config file.
af9b8b
+fi
af9b8b
+
af9b8b
 case $ACMD in
af9b8b
-start|stop|restart|graceful|graceful-stop)
af9b8b
-    $HTTPD $OPTIONS -k $ARGV
af9b8b
+start|stop|restart|status)
af9b8b
+    /usr/bin/systemctl $ACMD httpd24-httpd.service
af9b8b
+    ERROR=$?
af9b8b
+    ;;
af9b8b
+graceful)
f0c688
+    if /usr/bin/systemctl -q is-active httpd24-httpd.service; then
f0c688
+        /usr/bin/systemctl reload httpd24-httpd.service
f0c688
+    else
f0c688
+        /usr/bin/systemctl start httpd24-httpd.service
f0c688
+    fi
af9b8b
+    ERROR=$?
af9b8b
+    ;;
af9b8b
+graceful-stop)
af9b8b
+    /usr/bin/systemctl stop httpd24-httpd.service
af9b8b
     ERROR=$?
af9b8b
     ;;
af9b8b
 startssl|sslstart|start-SSL)
f0c688
@@ -114,10 +133,6 @@ startssl|sslstart|start-SSL)
af9b8b
 configtest)
af9b8b
     testconfig
af9b8b
     ;;
af9b8b
-status)
af9b8b
-    checklynx
af9b8b
-    $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
af9b8b
-    ;;
af9b8b
 fullstatus)
af9b8b
     checklynx
af9b8b
     $LYNX $STATUSURL