From 1797ee393fbf8a1aea1599fb1464cdd2af4dcbee Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 7 Jan 2019 13:48:54 +0800 Subject: [PATCH] Update index.py --- plugins/gogs/index.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/gogs/index.py b/plugins/gogs/index.py index 40593a43c..c6a96b930 100755 --- a/plugins/gogs/index.py +++ b/plugins/gogs/index.py @@ -52,11 +52,16 @@ def getArgs(): return tmp -def getInitdConf(): +def getInitdConfTpl(): path = getPluginDir() + "/init.d/gogs.tpl" return path +def getInitdConf(): + path = getServerDir() + "/init.d/gogs" + return path + + def getConf(): path = getServerDir() + "/custom/conf/app.ini" return path @@ -72,7 +77,7 @@ def status(): def initDreplace(): - file_tpl = getInitdConf() + file_tpl = getInitdConfTpl() service_path = public.getServerDir() initD_path = getServerDir() + '/init.d' @@ -82,7 +87,6 @@ def initDreplace(): content = public.readFile(file_tpl) content = content.replace('{$SERVER_PATH}', service_path) - public.writeFile(file_bin, content) public.execShell('chmod +x ' + file_bin)