|
|
@ -52,11 +52,16 @@ def getArgs(): |
|
|
|
return tmp |
|
|
|
return tmp |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getInitdConf(): |
|
|
|
def getInitdConfTpl(): |
|
|
|
path = getPluginDir() + "/init.d/gogs.tpl" |
|
|
|
path = getPluginDir() + "/init.d/gogs.tpl" |
|
|
|
return path |
|
|
|
return path |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getInitdConf(): |
|
|
|
|
|
|
|
path = getServerDir() + "/init.d/gogs" |
|
|
|
|
|
|
|
return path |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getConf(): |
|
|
|
def getConf(): |
|
|
|
path = getServerDir() + "/custom/conf/app.ini" |
|
|
|
path = getServerDir() + "/custom/conf/app.ini" |
|
|
|
return path |
|
|
|
return path |
|
|
@ -72,7 +77,7 @@ def status(): |
|
|
|
|
|
|
|
|
|
|
|
def initDreplace(): |
|
|
|
def initDreplace(): |
|
|
|
|
|
|
|
|
|
|
|
file_tpl = getInitdConf() |
|
|
|
file_tpl = getInitdConfTpl() |
|
|
|
service_path = public.getServerDir() |
|
|
|
service_path = public.getServerDir() |
|
|
|
|
|
|
|
|
|
|
|
initD_path = getServerDir() + '/init.d' |
|
|
|
initD_path = getServerDir() + '/init.d' |
|
|
@ -82,7 +87,6 @@ def initDreplace(): |
|
|
|
|
|
|
|
|
|
|
|
content = public.readFile(file_tpl) |
|
|
|
content = public.readFile(file_tpl) |
|
|
|
content = content.replace('{$SERVER_PATH}', service_path) |
|
|
|
content = content.replace('{$SERVER_PATH}', service_path) |
|
|
|
|
|
|
|
|
|
|
|
public.writeFile(file_bin, content) |
|
|
|
public.writeFile(file_bin, content) |
|
|
|
public.execShell('chmod +x ' + file_bin) |
|
|
|
public.execShell('chmod +x ' + file_bin) |
|
|
|
|
|
|
|
|
|
|
|