From fbdd395425a9ed72ecaa2ac0210b2f8f64eeb1f8 Mon Sep 17 00:00:00 2001 From: wukongdaily <2666180@gmail.com> Date: Mon, 22 Jun 2026 09:07:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=80=89=E9=A1=B91?= =?UTF-8?q?=E7=BC=BA=E5=B0=91UI=E8=BE=85=E5=8A=A9=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=8F=8A8080=E6=8F=90=E7=A4=BA=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复 be3600/be6500/gl-inet.sh 选项1缺少 UI辅助插件安装 - 新增 show_completion_message() 函数,确保8080提示始终显示在脚本末尾 - 新增 Mudi 7 (GL-E5800) 机型支持 - 新增 BE9300 机型支持 - 更新 main.sh 自动检测和手动菜单 --- README.md | 15 ++++- be3600.sh | 3 + be6500.sh | 4 ++ be9300.sh | 131 +++++++++++++++++++++++++++++++++++++++++++ gl-inet-op24.sh | 1 + gl-inet.sh | 3 + lib/lib-common.sh | 3 + main.sh | 55 +++++++++++------- mt3600.sh | 1 + mt5000.sh | 1 + mudi7.sh | 139 ++++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 335 insertions(+), 21 deletions(-) create mode 100644 be9300.sh create mode 100644 mudi7.sh diff --git a/README.md b/README.md index d9bda55..6de819c 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,9 @@ sh -c "$(curl -fsSL https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main/main.sh)" ``` 主脚本支持自动检测以下机型: -- GL-iNet BE-6500 / BE-3600 +- GL-iNet BE-6500 / BE-9300 / BE-3600 - GL-iNet MT-5000 / MT-3600 +- GL-iNet Mudi 7 (GL-E5800) - GL-iNet MT-2500A / MT-3000 / MT-6000 - OP24 固件专用脚本 @@ -33,6 +34,11 @@ sh -c "$(curl -fsSL https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main/gl-inet-op sh -c "$(curl -fsSL https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main/be6500.sh)" ``` +#### BE9300 +```bash +sh -c "$(curl -fsSL https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main/be9300.sh)" +``` + #### BE3600 ```bash sh -c "$(curl -fsSL https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main/be3600.sh)" @@ -43,6 +49,11 @@ sh -c "$(curl -fsSL https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main/be3600.sh) sh -c "$(curl -fsSL https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main/mt3600.sh)" ``` +#### Mudi 7 (GL-E5800) +```bash +sh -c "$(curl -fsSL https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main/mudi7.sh)" +``` + #### MT-5000 ```bash sh -c "$(curl -fsSL https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main/mt5000.sh)" @@ -78,9 +89,11 @@ gl/ ├── lib/ │ └── lib-common.sh # 公共函数库 ├── be6500.sh # BE6500专用脚本 +├── be9300.sh # BE9300专用脚本 ├── be3600.sh # BE3600专用脚本 ├── mt5000.sh # MT5000专用脚本 ├── mt3600.sh # MT3600专用脚本 +├── mudi7.sh # Mudi 7 (GL-E5800)专用脚本 ├── gl-inet.sh # MT2500/3000/6000通用脚本 ├── gl-inet-op24.sh # OP24固件专用脚本 └── mt-3000/ diff --git a/be3600.sh b/be3600.sh index 0cb7b33..78cff5d 100644 --- a/be3600.sh +++ b/be3600.sh @@ -90,6 +90,9 @@ while true; do setup_base_init do_istore do_quickstart + advanced_uninstall + do_install_ui_helper + show_completion_message ;; 2) do_install_argon_skin diff --git a/be6500.sh b/be6500.sh index 23dff96..392e510 100644 --- a/be6500.sh +++ b/be6500.sh @@ -89,6 +89,10 @@ while true; do install_istore_os_style setup_base_init do_istore + do_quickstart + advanced_uninstall + do_install_ui_helper + show_completion_message ;; 2) do_install_argon_skin diff --git a/be9300.sh b/be9300.sh new file mode 100644 index 0000000..79fe641 --- /dev/null +++ b/be9300.sh @@ -0,0 +1,131 @@ +#!/bin/sh +# GL-iNet BE9300 一键iStoreOS风格化脚本 +# by @wukongdaily + +HTTP_HOST="https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main" +LIB_COMMON="/tmp/lib-common.sh" + +# 下载并加载公共库 +load_common_lib() { + if [ ! -f "$LIB_COMMON" ]; then + wget -O "$LIB_COMMON" "$HTTP_HOST/lib/lib-common.sh" 2>/dev/null || { + echo "下载公共库失败" + exit 1 + } + fi + . "$LIB_COMMON" +} + +# BE9300 专用:64位架构配置 +add_arch_64bit() { + if ! wget -O /etc/opkg/arch.conf $HTTP_HOST/64bit/arch.conf; then + echo "下载 arch.conf 失败,脚本终止。" + exit 1 + fi +} + +# 安装应用商店和主题 +install_istore_os_style() { + do_install_argon_skin + opkg install luci-i18n-ttyd-zh-cn + opkg install openssh-sftp-server + do_install_filetransfer + FILE_PATH="/etc/openwrt_release" + NEW_DESCRIPTION="Openwrt like iStoreOS Style by wukongdaily" + CONTENT=$(cat $FILE_PATH) + UPDATED_CONTENT=$(echo "$CONTENT" | sed "s/DISTRIB_DESCRIPTION='[^']*'/DISTRIB_DESCRIPTION='$NEW_DESCRIPTION'/") + echo "$UPDATED_CONTENT" >$FILE_PATH +} + +# 首页和网络向导 +do_quickstart() { + download_lib_quickstart + download_luci_quickstart + opkg install /tmp/ipk_downloads/*.ipk + do_install_new_quickstart +} + +# ============================================================================ +# 主程序 +# ============================================================================ +load_common_lib + +while true; do + clear + gl_name=$(get_router_name) + result="GL-iNet Be9300 一键iStoreOS风格化(新版)" + echo "***********************************************************************" + echo "* 一键安装工具箱(for GL-iNet BE9300) by @wukongdaily" + echo "**********************************************************************" + echo "*******支持的机型列表***************************************************" + green "*******GL-iNet BE-9300********" + green "请确保您的固件版本在4.7.2以上" + echo + + light_magenta " 1. $result" + echo + light_magenta " 2. 安装argon紫色主题" + echo + light_magenta " 3. 单独安装iStore商店" + echo + light_magenta " 4. 隐藏首页无用元素" + echo + light_magenta " 5. 设置风扇工作温度" + echo + light_magenta " 6. 安装个性化UI辅助插件(by VMatrices)" + echo + light_magenta " 7. 安装高级卸载插件" + echo + light_magenta " 8. 安装新首页" + echo + light_magenta " 9. 恢复出厂设置" + echo + echo " Q. 退出本程序" + echo + read -p "请选择一个选项: " choice + + case $choice in + 1) + install_istore_os_style + setup_base_init + do_istore + do_quickstart + advanced_uninstall + do_install_ui_helper + show_completion_message + ;; + 2) + do_install_argon_skin + ;; + 3) + do_istore + ;; + 4) + hide_ui_elements + ;; + 5) + set_glfan_temp + ;; + 6) + do_install_ui_helper + ;; + 7) + advanced_uninstall + ;; + 8) + do_install_new_quickstart + ;; + 9) + recovery + ;; + q | Q) + echo "退出" + exit 0 + ;; + *) + echo "无效选项,请重新选择。" + ;; + esac + + read -p "按 Enter 键继续..." +done \ No newline at end of file diff --git a/gl-inet-op24.sh b/gl-inet-op24.sh index f9631ba..ed707ad 100644 --- a/gl-inet-op24.sh +++ b/gl-inet-op24.sh @@ -143,6 +143,7 @@ while true; do setup_base_init advanced_uninstall do_install_ui_helper + show_completion_message ;; 2) case "$gl_name" in diff --git a/gl-inet.sh b/gl-inet.sh index d59540f..c3e29b1 100755 --- a/gl-inet.sh +++ b/gl-inet.sh @@ -237,6 +237,9 @@ while true; do install_istore_os_style update_luci_app_quickstart setup_base_init + advanced_uninstall + do_install_ui_helper + show_completion_message ;; 2) add_custom_feed diff --git a/lib/lib-common.sh b/lib/lib-common.sh index cbc6d37..cabf74e 100644 --- a/lib/lib-common.sh +++ b/lib/lib-common.sh @@ -113,6 +113,9 @@ setup_base_init() { uci set system.@system[0].timezone='CST-8' uci commit system /etc/init.d/system reload +} + +show_completion_message() { green "安装完毕!请使用8080端口访问luci界面:http://192.168.8.1:8080" green "作者更多动态务必收藏:https://tvhelper.cpolar.cn/" } diff --git a/main.sh b/main.sh index b2b34a5..67a33dc 100755 --- a/main.sh +++ b/main.sh @@ -25,7 +25,7 @@ download_and_run_script() { local script_name="$1" mkdir -p "$SCRIPT_DIR" local script_path="$SCRIPT_DIR/$script_name" - + green "正在下载 $script_name..." wget -O "$script_path" "$HTTP_HOST/$script_name" 2>/dev/null || { red "下载 $script_name 失败" @@ -40,11 +40,14 @@ download_and_run_script() { auto_detect_and_run() { gl_name=$(get_router_name) echo "检测到路由器型号: $gl_name" - + case "$gl_name" in *BE6500* | *be6500*) download_and_run_script "be6500.sh" ;; + *BE9300* | *be9300*) + download_and_run_script "be9300.sh" + ;; *BE3600* | *be3600*) download_and_run_script "be3600.sh" ;; @@ -54,6 +57,9 @@ auto_detect_and_run() { *MT3600* | *mt3600*) download_and_run_script "mt3600.sh" ;; + *E5800* | *e5800* | *Mudi* | *mudi*) + download_and_run_script "mudi7.sh" + ;; *MT-3000* | *mt3000* | *MT3000*) if grep -q "OP24" /etc/openwrt_release 2>/dev/null; then download_and_run_script "gl-inet-op24.sh" @@ -85,42 +91,51 @@ select_model() { echo "请选择您的路由器型号:" echo green " 1. GL-iNet BE-6500" - green " 2. GL-iNet BE-3600" - green " 3. GL-iNet MT-5000" - green " 4. GL-iNet MT-3600" - green " 5. GL-iNet MT-2500A" - green " 6. GL-iNet MT-3000" - green " 7. GL-iNet MT-6000" + green " 2. GL-iNet BE-9300" + green " 3. GL-iNet BE-3600" + green " 4. GL-iNet MT-5000" + green " 5. GL-iNet MT-3600" + green " 6. GL-iNet Mudi 7 (GL-E5800)" echo - green " 8. GL-iNet MT-3000 (OP24固件)" - green " 9. GL-iNet MT-6000 (OP24固件)" + green " 7. GL-iNet MT-2500A" + green " 8. GL-iNet MT-3000" + green " 9. GL-iNet MT-6000" echo - green "10. MT-3000 换分区助手 (U盘扩容)" + green "10. GL-iNet MT-3000 (OP24固件)" + green "11. GL-iNet MT-6000 (OP24固件)" + echo + green "12. MT-3000 换分区助手 (U盘扩容)" echo echo " Q. 退出" echo read -p "请输入选项: " choice - + case $choice in 1) download_and_run_script "be6500.sh" ;; 2) - download_and_run_script "be3600.sh" + download_and_run_script "be9300.sh" ;; 3) - download_and_run_script "mt5000.sh" + download_and_run_script "be3600.sh" ;; 4) + download_and_run_script "mt5000.sh" + ;; + 5) download_and_run_script "mt3600.sh" ;; - 5 | 6 | 7) + 6) + download_and_run_script "mudi7.sh" + ;; + 7 | 8 | 9) download_and_run_script "gl-inet.sh" ;; - 8 | 9) + 10 | 11) download_and_run_script "gl-inet-op24.sh" ;; - 10) + 12) download_and_run_script "mt-3000/mt3000.sh" ;; q | Q) @@ -159,7 +174,7 @@ while true; do show_main_menu echo read -p "请输入选项: " main_choice - + case $main_choice in a | A) auto_detect_and_run @@ -175,7 +190,7 @@ while true; do red "无效选项,请重新选择" ;; esac - + echo read -p "按 Enter 键返回主菜单..." -done +done \ No newline at end of file diff --git a/mt3600.sh b/mt3600.sh index 8db6834..fac4923 100644 --- a/mt3600.sh +++ b/mt3600.sh @@ -108,6 +108,7 @@ while true; do setup_base_init do_istore do_quickstart + show_completion_message ;; 2) do_install_argon_skin diff --git a/mt5000.sh b/mt5000.sh index 42e3197..6ab9de0 100644 --- a/mt5000.sh +++ b/mt5000.sh @@ -108,6 +108,7 @@ while true; do setup_base_init do_istore do_quickstart + show_completion_message ;; 2) do_install_argon_skin diff --git a/mudi7.sh b/mudi7.sh new file mode 100644 index 0000000..74192bd --- /dev/null +++ b/mudi7.sh @@ -0,0 +1,139 @@ +#!/bin/sh +# GL-iNet Mudi 7 (GL-E5800) 一键iStoreOS风格化脚本 +# by @wukongdaily + +HTTP_HOST="https://cafe.cpolar.cn/wkdaily/gl/raw/branch/main" +LIB_COMMON="/tmp/lib-common.sh" + +# 下载并加载公共库 +load_common_lib() { + if [ ! -f "$LIB_COMMON" ]; then + wget -O "$LIB_COMMON" "$HTTP_HOST/lib/lib-common.sh" 2>/dev/null || { + echo "下载公共库失败" + exit 1 + } + fi + . "$LIB_COMMON" +} + +# Mudi 7 专用:架构配置 +add_arch() { + if ! wget -O /etc/opkg/arch.conf $HTTP_HOST/mtarch/arch.conf; then + echo "下载 arch.conf 失败,脚本终止。" + exit 1 + fi +} + +# 安装应用商店和主题 +install_istore_os_style() { + do_install_argon_skin + opkg install luci-i18n-ttyd-zh-cn + opkg install openssh-sftp-server + do_install_filetransfer + FILE_PATH="/etc/openwrt_release" + NEW_DESCRIPTION="Openwrt like iStoreOS Style by wukongdaily" + CONTENT=$(cat $FILE_PATH) + UPDATED_CONTENT=$(echo "$CONTENT" | sed "s/DISTRIB_DESCRIPTION='[^']*'/DISTRIB_DESCRIPTION='$NEW_DESCRIPTION'/") + echo "$UPDATED_CONTENT" >$FILE_PATH +} + +# 首页和网络向导 +do_quickstart() { + download_lib_quickstart + download_luci_quickstart + opkg install /tmp/ipk_downloads/*.ipk + do_install_new_quickstart + advanced_uninstall + do_install_ui_helper_silent +} + +# 自动安装UI辅助插件 +do_install_ui_helper_silent() { + local ipk_file="/tmp/glinjector_3.0.5-6_all.ipk" + local sha_file="${ipk_file}.sha256" + + wget -O "$sha_file" "$HTTP_HOST/ui/glinjector_3.0.5-6_all.ipk.sha256" || return 1 + wget --user-agent="Mozilla/5.0" -O "$ipk_file" "$HTTP_HOST/ui/glinjector_3.0.5-6_all.ipk" || return 1 + + cd "$(dirname "$ipk_file")" + sha256sum -c "$sha_file" || { + rm -f "$ipk_file" + return 1 + } + + opkg update + opkg install "$ipk_file" +} + +# ============================================================================ +# 主程序 +# ============================================================================ +load_common_lib + +while true; do + clear + gl_name=$(get_router_name) + result="GL-iNet Mudi 7 (GL-E5800) 一键iStoreOS风格化" + echo "***********************************************************************" + echo "* 一键安装工具箱(for GL-iNet Mudi 7) by @wukongdaily" + echo "**********************************************************************" + echo "*******支持的机型列表***************************************************" + green "*******GL-iNet Mudi 7 (GL-E5800)********" + echo + + light_magenta " 1. $result" + echo + light_magenta " 2. 安装argon紫色主题" + echo + light_magenta " 3. 单独安装iStore商店" + echo + light_magenta " 4. 隐藏首页格式化按钮" + echo + light_magenta " 5. 安装个性化UI辅助插件(by VMatrices)" + echo + light_magenta " 6. 安装高级卸载插件" + echo + light_magenta " 7. 恢复出厂设置/重置路由器" + echo + echo " Q. 退出本程序" + echo + read -p "请选择一个选项: " choice + + case $choice in + 1) + add_arch + install_istore_os_style + setup_base_init + do_istore + do_quickstart + show_completion_message + ;; + 2) + do_install_argon_skin + ;; + 3) + do_istore + ;; + 4) + hide_ui_elements + ;; + 5) + do_install_ui_helper + ;; + 6) + advanced_uninstall + ;; + 7) + recovery + ;; + q | Q) + echo "退出" + exit 0 + ;; + *) + echo "无效选项,请重新选择。" + ;; + esac + + read -p "按 Enter 键继续..." +done \ No newline at end of file