From d5e2f554f11ae03fc3aac6bb3e8865ba12171e2e Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 1 Nov 2024 17:21:19 +0800 Subject: [PATCH] update --- panel_tools.py | 6 +----- scripts/init.d/mw.tpl | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/panel_tools.py b/panel_tools.py index 171201b67..558b9ac93 100755 --- a/panel_tools.py +++ b/panel_tools.py @@ -23,14 +23,10 @@ web_dir = os.getcwd() + "/web" os.chdir(web_dir) sys.path.append(web_dir) +from admin import model import core.mw as mw import core.db as db -# cmd = 'ls /usr/local/lib/ | grep python | cut -d \\ -f 1 | awk \'END {print}\'' -# info = mw.execShell(cmd) -# p = "/usr/local/lib/" + info[0].strip() + "/site-packages" -# sys.path.append(p) - INIT_DIR = "/etc/rc.d/init.d" if mw.isAppleSystem(): INIT_DIR = mw.getPanelDir() + "/scripts/init.d" diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index c73cbf5cd..f57c64f6e 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -32,8 +32,6 @@ PANEL_DIR={$SERVER_PATH} ROOT_PATH=$(dirname "$PANEL_DIR") PATH=$PATH:${PANEL_DIR}/bin -echo ${PANEL_DIR} - if [ -f ${PANEL_DIR}/bin/activate ];then source ${PANEL_DIR}/bin/activate