From 2c265bbac0aa060071284585be4f6eac8e0d2173 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 8 Dec 2018 17:09:36 +0800 Subject: [PATCH] Update index.py --- plugins/php/index.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index e954d4d0f..f5c32b49d 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -8,10 +8,32 @@ import time sys.path.append(os.getcwd() + "/class/core") import public +app_debug = False +if public.getOs() == 'darwin': + app_debug = True + + +def getPluginName(): + return 'openresty' + + +def getPluginDir(): + return public.getPluginDir() + '/' + getPluginName() + + +def getServerDir(): + return public.getServerDir() + '/' + getPluginName() + + +def getInitDFile(): + if app_debug: + return '/tmp/' + getPluginName() + return '/etc/init.d/' + getPluginName() + def status(): data = public.execShell( - "ps -ef|grep redis |grep -v grep | grep -v python | awk '{print $2}'") + "ps -ef|grep php |grep -v grep | grep -v python | awk '{print $2}'") if data[0] == '': return 'stop' return 'start'