Update index.py
This commit is contained in:
parent
560d482f31
commit
e3ecdfb2b3
|
|
@ -254,21 +254,23 @@ def initDreplace():
|
|||
file_list = [
|
||||
'webstats_common.lua',
|
||||
'webstats_log.lua',
|
||||
'webstats_worker.lua',
|
||||
]
|
||||
|
||||
for fl in file_list:
|
||||
loadLuaFile(fl)
|
||||
|
||||
root_worker_dir = mw.getServerDir() + '/web_conf/nginx/lua/init_worker_by_lua_file'
|
||||
webstats_worker_src_file = lua_dir = getServerDir() + "/lua/webstats_worker.lua"
|
||||
webstats_worker_dst_file = root_worker_dir + '/webstats_worker.lua'
|
||||
|
||||
content = mw.readFile(webstats_worker_src_file)
|
||||
content = content.replace('{$SERVER_APP}', getServerDir())
|
||||
content = content.replace('{$ROOT_PATH}', mw.getServerDir())
|
||||
mw.writeFile(webstats_worker_dst_file, content)
|
||||
mw.opLuaInitWorkerFile()
|
||||
if not os.path.exists(webstats_worker_src_file):
|
||||
loadLuaFile('webstats_worker.lua')
|
||||
webstats_worker_src_file = lua_dir = getServerDir() + "/lua/webstats_worker.lua"
|
||||
content = mw.readFile(webstats_worker_src_file)
|
||||
content = content.replace('{$SERVER_APP}', getServerDir())
|
||||
content = content.replace('{$ROOT_PATH}', mw.getServerDir())
|
||||
mw.writeFile(webstats_worker_dst_file, content)
|
||||
mw.opLuaInitWorkerFile()
|
||||
os.remove(webstats_worker_src_file)
|
||||
|
||||
loadConfigFile()
|
||||
loadLuaSiteFile()
|
||||
|
|
|
|||
Loading…
Reference in New Issue