Update index.py

This commit is contained in:
Mr Chen
2018-12-07 16:44:08 +08:00
parent 629416760f
commit e9d4e09049
+6 -6
View File
@@ -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'