This commit is contained in:
midoks 2022-08-12 11:39:45 +08:00
parent e8483b78a0
commit 8b00a7436a
2 changed files with 7 additions and 10 deletions

View File

@ -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':

View File

@ -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':