Update site_api.py

pull/118/head
midoks 3 years ago
parent 64f7b9b50a
commit e7bc0ba1fb
  1. 11
      class/core/site_api.py

@ -830,11 +830,16 @@ class site_api:
if not mw.isInstalledWeb():
return mw.returnJson(False, '请安装并启动OpenResty服务!')
path = mw.getServerDir() + '/openresty/init.d/openresty'
data = mw.execShell(path + " status")
if data[0].strip().find('stopped') != -1:
# 这个快点
pid = mw.getServerDir() + '/openresty/nginx/logs/nginx.pid'
if not os.path.exists(pid):
return mw.returnJson(False, '请启动OpenResty服务!')
# path = mw.getServerDir() + '/openresty/init.d/openresty'
# data = mw.execShell(path + " status")
# if data[0].strip().find('stopped') != -1:
# return mw.returnJson(False, '请启动OpenResty服务!')
# import plugins_api
# data = plugins_api.plugins_api().run('openresty', 'status')
# if data[0].strip() == 'stop':

Loading…
Cancel
Save