mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
+15
-3
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user