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()