From 22df4cb5b115ad72aa21e948c947963c6472cbee Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 22 Jan 2024 23:41:02 +0800 Subject: [PATCH] Update task.py --- task.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/task.py b/task.py index 3accc525e..4c7e3f404 100755 --- a/task.py +++ b/task.py @@ -503,22 +503,22 @@ def checkPHPVersion(version): return False # 检查Web服务是否启动 - if result.find('Connection refused') != -1: - global isTask - if os.path.exists(isTask): - isStatus = mw.readFile(isTask) - if isStatus == 'True': - return True - - # systemd - systemd = mw.systemdCfgDir() + '/openresty.service' - if os.path.exists(systemd): - execShell('systemctl reload openresty') - return True - # initd - initd = '/etc/init.d/openresty' - if os.path.exists(initd): - os.system(initd + ' reload') + # if result.find('Connection refused') != -1: + # global isTask + # if os.path.exists(isTask): + # isStatus = mw.readFile(isTask) + # if isStatus == 'True': + # return True + + # # systemd + # systemd = mw.systemdCfgDir() + '/openresty.service' + # if os.path.exists(systemd): + # execShell('systemctl reload openresty') + # return True + # # initd + # initd = '/etc/init.d/openresty' + # if os.path.exists(initd): + # os.system(initd + ' reload') return True # --------------------------------------PHP监控 end--------------------------------------------- # @@ -536,7 +536,7 @@ def openrestyAutoRestart(): continue # systemd - systemd = '/lib/systemd/system/openresty.service' + systemd = mw.systemdCfgDir()+'/openresty.service' initd = '/etc/init.d/openresty' if os.path.exists(systemd): execShell('systemctl reload openresty')