From abc74b3e3bbb13a4734d7ba68ed2dff4b254dd6f Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 25 Feb 2019 15:18:08 +0800 Subject: [PATCH] Update index.py --- plugins/openresty/index.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index bd0e265c3..ed737584c 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -65,6 +65,11 @@ def getConf(): return path +def getConfTpl(): + path = getPluginDir() + '/conf/nginx.conf' + return path + + def getOs(): data = {} data['os'] = public.getOs() @@ -107,7 +112,7 @@ def checkAuthEq(file, owner='root'): def confReplace(): service_path = os.path.dirname(os.getcwd()) - content = public.readFile(getConf()) + content = public.readFile(getConfTpl()) content = content.replace('{$SERVER_PATH}', service_path) user = 'www'