diff --git a/plugins/op_waf/index.py b/plugins/op_waf/index.py index c435ad7a0..2577aebec 100755 --- a/plugins/op_waf/index.py +++ b/plugins/op_waf/index.py @@ -901,8 +901,11 @@ def getWafConf(): return mw.readFile(conf) -def getWafSite(): - return '' +def installPreInspection(): + check_op = mw.getServerDir() + "/openresty" + if not os.path.exists(check_op): + return "请先安装OpenResty" + return 'ok' if __name__ == "__main__": @@ -917,6 +920,8 @@ if __name__ == "__main__": print(restart()) elif func == 'reload': print(reload()) + elif func == 'install_pre_inspection': + print(installPreInspection()) elif func == 'conf': print(getConf()) elif func == 'get_rule': diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 5d58ef5c4..8fe7e0386 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -296,12 +296,6 @@ def errorLogPath(): return getServerDir() + '/nginx/logs/error.log' -def installPreInspection(): - check_op = mw.getServerDir() + "/openresty" - if not os.path.exists(check_op): - return "请先安装OpenResty" - return 'ok' - if __name__ == "__main__": func = sys.argv[1] if func == 'status': @@ -320,8 +314,6 @@ if __name__ == "__main__": print(initdInstall()) elif func == 'initd_uninstall': print(initdUinstall()) - elif func == 'install_pre_inspection': - print(installPreInspection()) elif func == 'conf': print(getConf()) elif func == 'get_os':