diff --git a/lib/lib-common.sh b/lib/lib-common.sh index 2ccd453..bd4afaf 100644 --- a/lib/lib-common.sh +++ b/lib/lib-common.sh @@ -342,6 +342,21 @@ do_install_ui_helper() { # ============================================================================ advanced_uninstall() { opkg update >/dev/null 2>&1 && opkg install bash || echo "bash 已存在" + + if ! opkg list-installed | grep -q "luci-lua-runtime"; then + echo "📥 正在下载 luci-lua-runtime 依赖..." + wget -O /tmp/luci-lua-runtime.ipk "https://repo.istoreos.com/repo/all/compat/luci-lua-runtime_0.00-r0_all.ipk" || { + echo "❌ 下载 luci-lua-runtime 失败" + return 1 + } + opkg install /tmp/luci-lua-runtime.ipk || { + echo "❌ 安装 luci-lua-runtime 失败" + return 1 + } + rm -f /tmp/luci-lua-runtime.ipk + echo "✅ luci-lua-runtime 安装成功" + fi + echo "📥 正在下载高级卸载插件..." wget -O /tmp/advanced_uninstall.run $HTTP_HOST/uninstall/luci-app-uninstall.run sh /tmp/advanced_uninstall.run