From a459aa936e46bc85915bcc8fc58690eb1d63006f Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 11 Jul 2020 01:24:54 +0800 Subject: [PATCH] Update index.py --- plugins/openresty/index.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 0e01bc947..89d5a623b 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -162,18 +162,18 @@ def initDreplace(): print "ok" exit(0) + file_bin = initD_path + '/' + getPluginName() if not os.path.exists(initD_path): os.mkdir(initD_path) - file_bin = initD_path + '/' + getPluginName() - # initd replace - content = mw.readFile(file_tpl) - content = content.replace('{$SERVER_PATH}', service_path) - mw.writeFile(file_bin, content) - mw.execShell('chmod +x ' + file_bin) + # initd replace + content = mw.readFile(file_tpl) + content = content.replace('{$SERVER_PATH}', service_path) + mw.writeFile(file_bin, content) + mw.execShell('chmod +x ' + file_bin) - # config replace - confReplace() + # config replace + confReplace() # make nginx vhost or other makeConf()