mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update index.py
This commit is contained in:
@@ -11,22 +11,22 @@ import public
|
|||||||
app_debug = False
|
app_debug = False
|
||||||
|
|
||||||
|
|
||||||
def getAppName():
|
def getPluginName():
|
||||||
return 'memcached'
|
return 'memcached'
|
||||||
|
|
||||||
|
|
||||||
def getPluginDir():
|
def getPluginDir():
|
||||||
return public.getPluginDir() + '/' + getAppName()
|
return public.getPluginDir() + '/' + getPluginName()
|
||||||
|
|
||||||
|
|
||||||
def getServerDir():
|
def getServerDir():
|
||||||
return public.getServerDir() + '/' + getAppName()
|
return public.getServerDir() + '/' + getPluginName()
|
||||||
|
|
||||||
|
|
||||||
def getInitDFile():
|
def getInitDFile():
|
||||||
if app_debug:
|
if app_debug:
|
||||||
return '/tmp/' + getAppName()
|
return '/tmp/' + getPluginName()
|
||||||
return '/etc/init.d/' + getAppName()
|
return '/etc/init.d/' + getPluginName()
|
||||||
|
|
||||||
|
|
||||||
def getConf():
|
def getConf():
|
||||||
@@ -45,7 +45,7 @@ def getArgs():
|
|||||||
|
|
||||||
def status():
|
def status():
|
||||||
data = public.execShell(
|
data = public.execShell(
|
||||||
"ps -ef|grep " + getAppName() + " |grep -v grep | grep -v python | awk '{print $2}'")
|
"ps -ef|grep " + getPluginName() + " |grep -v grep | grep -v python | awk '{print $2}'")
|
||||||
if data[0] == '':
|
if data[0] == '':
|
||||||
return 'stop'
|
return 'stop'
|
||||||
return 'start'
|
return 'start'
|
||||||
|
|||||||
Reference in New Issue
Block a user