From ef6cc77dc22ba49b6d858ce3140205770415e53f Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sat, 14 Dec 2024 02:40:12 +0800 Subject: [PATCH] update --- panel_tools.py | 4 ++++ scripts/init.d/mw.tpl | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/panel_tools.py b/panel_tools.py index 71f4d8be4..bde7f5a31 100755 --- a/panel_tools.py +++ b/panel_tools.py @@ -58,6 +58,7 @@ def mwcli(mw_input=0): '(3) 启动面板服务', '(4) 重载面板服务', '(5) 修改面板端口', + '(6) 关闭安全入口', '(10) 查看面板默认信息', '(11) 修改面板密码', '(12) 修改面板用户名', @@ -128,6 +129,9 @@ def mwcli(mw_input=0): else: mw.echoInfo("端口范围在0-65536之间") return + elif mw_input == 6: + thisdb.setOption('admin_path', '') + mw.echoInfo("关闭安全入口成功!") elif mw_input == 10: os.system(INIT_CMD + " default") elif mw_input == 11: diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 72e8f9183..a5b4e24c4 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -324,9 +324,7 @@ mw_install_app() } mw_close_admin_path(){ - if [ -f $mw_path/data/admin_path.pl ]; then - rm -rf $mw_path/data/admin_path.pl - fi + cd ${PANEL_DIR} && python3 panel_tools.py cli 6 } mw_force_kill()