From be4570e115d83b032b1e0b1d1cfde2f694944218 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 12:11:09 +0800 Subject: [PATCH] Update index.py --- plugins/php/index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 1e7c9a739..27b79f3ab 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -275,7 +275,7 @@ def phpOp(version, method): data = mw.execShell('systemctl ' + method + ' php' + version) if data[1] == '': return 'ok' - return 'fail' + return data[1] data = mw.execShell(file + ' ' + method) if data[1] == '': @@ -556,13 +556,13 @@ def getFpmStatus(version): try: url = 'http://' + mw.getHostAddr() + '/phpfpm_status_' + version + '?json' - result = mw.httpGet(url) + result = mw.httpGet(url, 1) data = json.loads(result) fTime = time.localtime(int(data['start time'])) data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) except Exception as e: url = 'http://127.0.0.1/phpfpm_status_' + version + '?json' - result = mw.httpGet(url) + result = mw.httpGet(url, 1) data = json.loads(result) fTime = time.localtime(int(data['start time'])) data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime)