From 15df77940e754c9970af442e5257862430bc05f6 Mon Sep 17 00:00:00 2001 From: dami Date: Thu, 7 May 2026 12:09:57 +0800 Subject: [PATCH] Update index.py --- plugins/supervisor/index.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/supervisor/index.py b/plugins/supervisor/index.py index 1a9d69c6a..d277eca8f 100755 --- a/plugins/supervisor/index.py +++ b/plugins/supervisor/index.py @@ -74,11 +74,15 @@ def checkArgs(data, ck=[]): def status(): - data = mw.execShell( - "ps -ef|grep supervisor | grep -v grep | grep -v index.py | awk '{print $2}'") - if data[0] == '': - return 'stop' - return 'start' + # data = mw.execShell( + # "ps -ef|grep supervisor | grep -v grep | grep -v index.py | awk '{print $2}'") + # if data[0] == '': + # return 'stop' + + pid_file = getServerDir() + "/run/supervisor.pid" + if os.path.exists(pid_file): + return "start" + return 'stop' def initDreplace():