From 2b15c77cdc63c891590be5913c936b25538f5f19 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 24 Sep 2024 14:09:20 +0800 Subject: [PATCH] Update index_php_yum.py --- plugins/php-yum/index_php_yum.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/php-yum/index_php_yum.py b/plugins/php-yum/index_php_yum.py index ab639b571..ca48cfe43 100755 --- a/plugins/php-yum/index_php_yum.py +++ b/plugins/php-yum/index_php_yum.py @@ -75,14 +75,11 @@ def getPhpSocket(version): def status(version): - ''' - sock文件判断是否启动 - ''' - sock = getPhpSocket(version) - if sock.find(':'): - return status_progress(version) - - if not os.path.exists(sock): + # ps -ef|grep 'php/81' |grep -v grep | grep -v python | awk '{print $2} + cmd = "ps -ef|grep 'remi/php" + version + \ + "' |grep -v grep | grep -v python | awk '{print $2}'" + data = mw.execShell(cmd) + if data[0] == '': return 'stop' return 'start'