mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:19:26 +08:00
Update index.py
This commit is contained in:
@@ -15,6 +15,26 @@ def status():
|
||||
return 'start'
|
||||
|
||||
|
||||
def start():
|
||||
public.execShell('sysctl -p')
|
||||
return 'ok'
|
||||
|
||||
|
||||
def stop():
|
||||
public.execShell('sysctl -p')
|
||||
return 'ok'
|
||||
|
||||
|
||||
def restart():
|
||||
public.execShell('sysctl -p')
|
||||
return 'ok'
|
||||
|
||||
|
||||
def reload():
|
||||
public.execShell('sysctl -p')
|
||||
return 'ok'
|
||||
|
||||
|
||||
def sysConf():
|
||||
return '/etc/sysctl.conf'
|
||||
|
||||
@@ -22,5 +42,13 @@ if __name__ == "__main__":
|
||||
func = sys.argv[1]
|
||||
if func == 'status':
|
||||
print status()
|
||||
elif func == 'start':
|
||||
print start()
|
||||
elif func == 'stop':
|
||||
print stop()
|
||||
elif func == 'restart':
|
||||
print restart()
|
||||
elif func == 'reload':
|
||||
print reload()
|
||||
elif func == 'conf':
|
||||
print sysConf()
|
||||
|
||||
Reference in New Issue
Block a user