From b6ef8d162534b7741b3387df829c06e1295a1fcc Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 21 Oct 2022 19:16:07 +0800 Subject: [PATCH] up --- plugins/op_waf/index.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/op_waf/index.py b/plugins/op_waf/index.py index bd7bdae7a..73c963344 100755 --- a/plugins/op_waf/index.py +++ b/plugins/op_waf/index.py @@ -314,6 +314,15 @@ def initDefaultInfo(): mw.writeFile(default_json, json.dumps(ddata)) +def autoMakeConfig(): + path = getServerDir() + + initDomainInfo() + initSiteInfo() + initTotalInfo() + autoMakeLuaConf() + + def initDreplace(): path = getServerDir() @@ -363,7 +372,6 @@ def initDreplace(): initSiteInfo() initTotalInfo() autoMakeLuaConf() - initDefaultInfo() pSqliteDb() @@ -1086,6 +1094,8 @@ def setObjOpen(): cjson = mw.getJson(cobj) mw.writeFile(conf, cjson) + + autoMakeConfig() mw.restartWeb() return mw.returnJson(True, '设置成功!') @@ -1116,6 +1126,9 @@ def setSiteObjOpen(): cjson = mw.getJson(content) mw.writeFile(path, cjson) + + autoMakeConfig() + mw.restartWeb() return mw.returnJson(True, '设置成功!')