加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-httpd-2.4.3-apctl-systemd.patch 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
yangl777 提交于 2022-03-26 16:26 . update httpd to 2.4.51
Make apachectl run via systemctl.
Note: "apachectl graceful" is documented to start httpd if not running.
Upstream-Status: vendor specific patch
--- httpd-2.4.18/support/apachectl.in.apctlsystemd
+++ httpd-2.4.18/support/apachectl.in
@@ -100,9 +100,28 @@ fi
ERROR=$?
}
+if [ "x$2" != "x" ] ; then
+ echo Passing arguments to httpd using apachectl is no longer supported.
+ echo You can only start/stop/restart httpd using this script.
+ echo If you want to pass extra arguments to httpd, edit the
+ echo /etc/sysconfig/httpd config file.
+fi
+
case $ACMD in
-start|stop|restart|graceful|graceful-stop)
- $HTTPD $OPTIONS -k $ARGV
+start|stop|restart|status)
+ /usr/bin/systemctl $ACMD httpd.service
+ ERROR=$?
+ ;;
+graceful)
+ 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)
+ /usr/bin/systemctl stop httpd.service
ERROR=$?
;;
startssl|sslstart|start-SSL)
@@ -114,10 +133,6 @@ startssl|sslstart|start-SSL)
configtest)
testconfig
;;
-status)
- checklynx
- $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
- ;;
fullstatus)
checklynx
$LYNX $STATUSURL
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化