From b561e9149b3453928f0fed330f74a011faabddb6 Mon Sep 17 00:00:00 2001 From: CN-JS-HuiBai Date: Sun, 8 Feb 2026 23:08:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E5=9C=B0=E5=8C=BA=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Prometheus/install_node_exporter.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Prometheus/install_node_exporter.sh b/Prometheus/install_node_exporter.sh index c41d741..ef831a6 100644 --- a/Prometheus/install_node_exporter.sh +++ b/Prometheus/install_node_exporter.sh @@ -28,7 +28,8 @@ is_cn=false echo "Detecting geographic location..." -COUNTRY=$(curl -s --max-time 3 https://ipinfo.io/country || true) +COUNTRY=$(curl -s --max-time 5 https://ipinfo.littlediary.cn/info | grep -o '"country":"[^"]*"' | cut -d'"' -f4) + if [ "$COUNTRY" = "CN" ]; then is_cn=true fi