From a46f824e1e87746aabdcc23bfffd452722d46183 Mon Sep 17 00:00:00 2001 From: dami Date: Thu, 7 May 2026 11:40:09 +0800 Subject: [PATCH 1/6] Update install.sh --- plugins/supervisor/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/supervisor/install.sh b/plugins/supervisor/install.sh index 96ece61ac..bb9698729 100755 --- a/plugins/supervisor/install.sh +++ b/plugins/supervisor/install.sh @@ -9,6 +9,8 @@ serverPath=$(dirname "$rootPath") VERSION=$2 +# cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.0 +# /www/server/mdserver-web/bin/supervisord -n -c /etc/supervisor/supervisord.conf # /www/server/mdserver-web/bin/supervisorctl -c /www/server/supervisor/supervisor.conf # cmd | status From 93efe453470f821aa5c6c18a36f905934d81ca6a Mon Sep 17 00:00:00 2001 From: dami Date: Thu, 7 May 2026 11:40:52 +0800 Subject: [PATCH 2/6] Update install.sh --- plugins/supervisor/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/supervisor/install.sh b/plugins/supervisor/install.sh index bb9698729..d3dc02c29 100755 --- a/plugins/supervisor/install.sh +++ b/plugins/supervisor/install.sh @@ -9,7 +9,7 @@ serverPath=$(dirname "$rootPath") VERSION=$2 -# cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.0 +# cd /www/server/mdserver-web/plugins/supervisor && bash install.sh install 1.0 # /www/server/mdserver-web/bin/supervisord -n -c /etc/supervisor/supervisord.conf # /www/server/mdserver-web/bin/supervisorctl -c /www/server/supervisor/supervisor.conf # cmd | status From 0e7845985a5b58c6775ff72275e1944f0cb8786e Mon Sep 17 00:00:00 2001 From: dami Date: Thu, 7 May 2026 11:51:06 +0800 Subject: [PATCH 3/6] Update install.sh --- plugins/supervisor/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/supervisor/install.sh b/plugins/supervisor/install.sh index d3dc02c29..a5fe72505 100755 --- a/plugins/supervisor/install.sh +++ b/plugins/supervisor/install.sh @@ -13,6 +13,7 @@ VERSION=$2 # /www/server/mdserver-web/bin/supervisord -n -c /etc/supervisor/supervisord.conf # /www/server/mdserver-web/bin/supervisorctl -c /www/server/supervisor/supervisor.conf # cmd | status +# journalctl -u supervisor -f bash ${rootPath}/scripts/getos.sh OSNAME=`cat ${rootPath}/data/osname.pl` From a23264a54256e111a13e1067688bf4b9b314a413 Mon Sep 17 00:00:00 2001 From: dami Date: Thu, 7 May 2026 12:03:23 +0800 Subject: [PATCH 4/6] update --- plugins/supervisor/install.sh | 1 + web/utils/plugin.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/supervisor/install.sh b/plugins/supervisor/install.sh index a5fe72505..eeb4c66e3 100755 --- a/plugins/supervisor/install.sh +++ b/plugins/supervisor/install.sh @@ -13,6 +13,7 @@ VERSION=$2 # /www/server/mdserver-web/bin/supervisord -n -c /etc/supervisor/supervisord.conf # /www/server/mdserver-web/bin/supervisorctl -c /www/server/supervisor/supervisor.conf # cmd | status +# systemctl status supervisor # journalctl -u supervisor -f bash ${rootPath}/scripts/getos.sh diff --git a/web/utils/plugin.py b/web/utils/plugin.py index 32d858b3b..b6f8fa796 100644 --- a/web/utils/plugin.py +++ b/web/utils/plugin.py @@ -839,12 +839,17 @@ class plugin(object): if not os.path.exists(path): return ('', '') - py_cmd = 'cd ' + mw.getPanelDir() + " && "+ py_cmd - data = mw.execShell(py_cmd) + + source_bin_activate = mw.getPanelDir() + "/bin/activate" + py_cmd_dir = 'cd ' + mw.getPanelDir() + if os.path.exists(source_bin_activate): + py_cmd_dir += " source "+source_bin_activate + do_cmd = py_cmd_dir + " && "+ py_cmd + data = mw.execShell(do_cmd) # print(data) if mw.isDebugMode(): - print('run:', py_cmd) + print('run:', do_cmd) print(data) # print os.path.exists(py_cmd) return (data[0].strip(), data[1].strip()) From 9781516552091fb2fb648270a856b4f5da5cf036 Mon Sep 17 00:00:00 2001 From: dami Date: Thu, 7 May 2026 12:05:18 +0800 Subject: [PATCH 5/6] Update plugin.py --- web/utils/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/utils/plugin.py b/web/utils/plugin.py index b6f8fa796..a44249ebd 100644 --- a/web/utils/plugin.py +++ b/web/utils/plugin.py @@ -843,7 +843,7 @@ class plugin(object): source_bin_activate = mw.getPanelDir() + "/bin/activate" py_cmd_dir = 'cd ' + mw.getPanelDir() if os.path.exists(source_bin_activate): - py_cmd_dir += " source "+source_bin_activate + py_cmd_dir += " && source "+source_bin_activate do_cmd = py_cmd_dir + " && "+ py_cmd data = mw.execShell(do_cmd) From 15df77940e754c9970af442e5257862430bc05f6 Mon Sep 17 00:00:00 2001 From: dami Date: Thu, 7 May 2026 12:09:57 +0800 Subject: [PATCH 6/6] 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():