From f57a4cd9e031ce3820631da59e35fbf46b66b4b4 Mon Sep 17 00:00:00 2001 From: hotyue <52734432+hotyue@users.noreply.github.com> Date: Mon, 1 Jun 2026 08:21:01 +0000 Subject: [PATCH] =?UTF-8?q?fix(install):=20=E4=BF=AE=E5=A4=8D=E5=B9=B3?= =?UTF-8?q?=E6=BB=91=E5=8D=87=E7=BA=A7=E6=97=B6=E5=AE=B9=E7=81=BE=E5=BC=B9?= =?UTF-8?q?=E5=8C=A3=E7=BB=84=E8=A3=85=E7=BC=BA=E5=B0=91=E9=80=97=E5=8F=B7?= =?UTF-8?q?=E5=88=86=E9=9A=94=E7=AC=A6=E7=9A=84=E8=87=B4=E5=91=BD=E6=8B=BC?= =?UTF-8?q?=E6=8E=A5=E9=94=99=E8=AF=AF=EF=BC=8C=E4=BF=9D=E9=9A=9C=20Master?= =?UTF-8?q?=20=E6=8C=87=E4=BB=A4=E8=A7=A3=E6=9E=90=E5=99=A8=E5=85=8D?= =?UTF-8?q?=E9=81=AD=E6=88=AA=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/install.sh b/core/install.sh index af450cb..d045982 100755 --- a/core/install.sh +++ b/core/install.sh @@ -658,14 +658,16 @@ if [ "$UPGRADE_MODE" == "true" ]; then RAW_BASE_IP=$(echo "$SAFE_PUBLIC_IP" | tr -d '[]') # 追加 V4 容灾备弹 - if [[ -n "$RAW_V4" ]] && [[ "$RAW_V4" != "$RAW_BASE_IP" ]]; then + if [[ -n "$RAW_V4" ]] && [[ "$NEW_COMM_IP" != *"$RAW_V4"* ]]; then NEW_COMM_IP="${NEW_COMM_IP},${RAW_V4}" fi # 追加 V6 容灾备弹 - if [[ -n "$RAW_V6" ]] && [[ "$RAW_V6" != "$RAW_BASE_IP" ]]; then + if [[ -n "$RAW_V6" ]]; then [[ "$RAW_V6" != *"["* ]] && SAFE_V6="[${RAW_V6}]" || SAFE_V6="$RAW_V6" - NEW_COMM_IP="${NEW_COMM_IP},${SAFE_V6}" + if [[ "$NEW_COMM_IP" != *"$SAFE_V6"* ]]; then + NEW_COMM_IP="${NEW_COMM_IP},${SAFE_V6}" + fi fi # 强制覆盖 config.conf 中的旧 COMM_IP 记录