-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.py
executable file
·67 lines (47 loc) · 973 Bytes
/
index.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# coding:utf-8
import sys
import io
import os
import time
import re
import string
import subprocess
def getPluginName():
return 'simple-plugin'
def status():
# start | stop
return 'start'
def start():
return 'ok'
def stop():
return 'ok'
def restart():
return 'ok'
def reload():
return 'ok'
def initdStatus():
return 'ok'
def initdInstall():
return 'ok'
def initdUinstall():
return 'ok'
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 == 'initd_status':
print(initdStatus())
elif func == 'initd_install':
print(initdInstall())
elif func == 'initd_uninstall':
print(initdUinstall())
else:
print('error')