diff --git a/plugins/php-apt/index.py b/plugins/php-apt/index.py index 8b5a38f23..e70b07998 100755 --- a/plugins/php-apt/index.py +++ b/plugins/php-apt/index.py @@ -76,11 +76,16 @@ def getFpmFile(version): def status(version): # ps -ef|grep 'php/81' |grep -v grep | grep -v python | awk '{print $2} - cmd = "ps -ef|grep 'php/" + version + "' |grep -v grep | grep -v python | awk '{print $2}'" - data = mw.execShell(cmd) - if data[0] == '': - return 'stop' - return 'start' + # cmd = "ps -ef|grep 'php/" + version + "' |grep -v grep | grep -v python | awk '{print $2}'" + # data = mw.execShell(cmd) + # if data[0] == '': + # return 'stop' + # return 'start' + sock_file = "/run/php/php${version:0:1}.${version:1:2}-fpm.sock" + if os.path.exists(sock_file): + return 'start' + return 'stop' + def contentReplace(content, version):