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