From 1c2474cf9eab302128827ca206c5dd6ca3a96a30 Mon Sep 17 00:00:00 2001 From: juewuy Date: Wed, 7 Jan 2026 20:23:56 +0800 Subject: [PATCH] =?UTF-8?q?~=E5=A2=9E=E5=8A=A0ecs=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/libs/get_ecsip.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/libs/get_ecsip.sh b/scripts/libs/get_ecsip.sh index d99a15ef..21cec0fa 100644 --- a/scripts/libs/get_ecsip.sh +++ b/scripts/libs/get_ecsip.sh @@ -1,10 +1,8 @@ get_ecs_address() { - ip=$(uci get network.wan.dns 2>/dev/null) - [ -n "$ip" ] && return for f in /tmp/resolv.conf.auto /tmp/resolv.conf /tmp/resolv.conf.d/resolv.conf.auto; do [ -f "$f" ] || continue - ip=$(grep -A2 "^# Interface wan" "$f" | grep nameserver | awk '{printf "%s ", $2}') + ip=$(grep -A1 "^# Interface wan$" "$f" | grep nameserver | awk '{printf "%s ", $2}') [ -n "$ip" ] && return done . "$CRASHDIR"/libs/web_get_lite.sh