This commit is contained in:
Mr Chen
2018-12-14 18:29:53 +08:00
parent 1cb57d3f65
commit 7d6ddb40db
4 changed files with 34 additions and 9 deletions
+15 -3
View File
@@ -52,11 +52,16 @@ def getArgs():
return tmp
def getConf():
def getInitdConf():
path = getPluginDir() + "/init.d/gogs.tpl"
return path
def getConf():
path = getServerDir() + "/custom/conf/app.ini"
return path
def status():
data = public.execShell(
"ps -ef|grep " + getPluginName() + " |grep -v grep | grep -v python | awk '{print $2}'")
@@ -154,6 +159,11 @@ def initdUinstall():
os.remove(initd_bin)
return 'ok'
def runLog():
log_path = getServerDir() + '/log/gogs.log'
return log_path
if __name__ == "__main__":
func = sys.argv[1]
if func == 'status':
@@ -172,9 +182,11 @@ if __name__ == "__main__":
print initdInstall()
elif func == 'initd_uninstall':
print initdUinstall()
elif func == 'run_info':
print runInfo()
elif func == 'run_log':
print runLog()
elif func == 'conf':
print getConf()
elif func == 'init_conf':
print getInitdConf()
else:
print 'fail'