From fc5acaf0be1344dc79f4b4e903433155c1282fa8 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 11 Apr 2026 20:40:07 +0800 Subject: [PATCH] Update index.py --- plugins/apache/index.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/apache/index.py b/plugins/apache/index.py index 83c6902bb..563aace3f 100755 --- a/plugins/apache/index.py +++ b/plugins/apache/index.py @@ -224,7 +224,7 @@ def restyOp(method): file = initDreplace() # 启动时,先检查一下配置文件 - check = getServerDir() + "/apache/httpd/bin/httpd -t" + check = getServerDir() + "/httpd/bin/httpd -t" check_data = mw.execShell(check) if not check_data[1].find('test is successful') > -1: return check_data[1] @@ -237,12 +237,12 @@ def restyOp(method): return data[1] if current_os.startswith("freebsd"): - data = mw.execShell('service httpd ' + method) + mw.execShell('service '+getPluginName()+' '+method) if data[1] == '': return 'ok' return data[1] - data = mw.execShell('systemctl ' + method + ' httpd') + data = mw.execShell('systemctl ' + method + ' '+getPluginName()) if data[1] == '': return 'ok' return data[1] @@ -251,10 +251,10 @@ def restyOp(method): def op_submit_systemctl_restart(): current_os = mw.getOs() if current_os.startswith("freebsd"): - mw.execShell('service httpd restart') + mw.execShell('service '+getPluginName()+' restart') return True - mw.execShell('systemctl restart httpd') + mw.execShell('systemctl restart '+getPluginName()) return True @@ -266,7 +266,7 @@ def restyOp_restart(): file = initDreplace() # 启动时,先检查一下配置文件 - check = getServerDir() + "/apache/httpd/bin/httpd -t" + check = getServerDir() + "/httpd/bin/httpd -t" check_data = mw.execShell(check) if not check_data[1].find('test is successful') > -1: return 'ERROR: 配置出错
' + check_data[1].replace("\n", '
') + '
'