From e4582f328ca441d5515c3bc0b29c3d9383674e16 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 13 Feb 2023 14:35:14 +0800 Subject: [PATCH] Update index.py --- plugins/openresty/index.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 096d37382..01f135dfa 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -149,16 +149,16 @@ def confReplace(): mw.execShell('mkdir -p ' + lua_conf_dir) lua_conf = lua_conf_dir + '/lua.conf' - if not os.path.exists(lua_conf): - lua_conf_tpl = getPluginDir() + '/conf/lua.conf' - lua_content = mw.readFile(lua_conf_tpl) - lua_content = lua_content.replace('{$SERVER_PATH}', service_path) - mw.writeFile(lua_conf, lua_content) + lua_conf_tpl = getPluginDir() + '/conf/lua.conf' + lua_content = mw.readFile(lua_conf_tpl) + lua_content = lua_content.replace('{$SERVER_PATH}', service_path) + mw.writeFile(lua_conf, lua_content) empty_lua = lua_conf_dir + '/empty.lua' if not os.path.exists(empty_lua): mw.writeFile(empty_lua, '') + mw.opLuaInitFile() mw.opLuaInitWorkerFile() mw.opLuaInitAccessFile()