From 6ec69f43b0c951cc4181d38f481df3a56fc8c730 Mon Sep 17 00:00:00 2001 From: tmxk2021 <90445826+tmxk2021@users.noreply.github.com> Date: Sat, 22 Feb 2025 16:54:26 +0800 Subject: [PATCH] Update openwrtlive.sh --- openwrtlive.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openwrtlive.sh b/openwrtlive.sh index a406f5b..b260c1e 100644 --- a/openwrtlive.sh +++ b/openwrtlive.sh @@ -55,7 +55,11 @@ echo "FEIYANG_IP: $FEIYANG_IP" echo "检查 Nginx 是否已安装..." if ! command -v nginx &> /dev/null; then echo "Nginx 未安装,开始安装..." - opkg update && opkg install nginx nginx-mod-luci-ssl || { echo "Nginx 安装失败!请检查 opkg 是否正常工作。"; exit 1; } + + # 强制继续执行 opkg install + opkg update || echo "opkg update 失败,继续安装 nginx..." + opkg install nginx || { echo "Nginx 安装失败,请检查网络或软件源!" >&2; exit 1; } + else echo "Nginx 已安装,跳过安装步骤。" fi