diff --git a/Prometheus/install_node_exporter.sh b/Prometheus/install_node_exporter.sh index ef831a6..1a8ae45 100644 --- a/Prometheus/install_node_exporter.sh +++ b/Prometheus/install_node_exporter.sh @@ -28,13 +28,11 @@ is_cn=false echo "Detecting geographic location..." -COUNTRY=$(curl -s --max-time 5 https://ipinfo.littlediary.cn/info | grep -o '"country":"[^"]*"' | cut -d'"' -f4) +COUNTRY=$(curl -s --max-time 5 https://ipinfo.littlediary.cn/info | grep -o '"countryName":"[^"]*"' | cut -d'"' -f4) -if [ "$COUNTRY" = "CN" ]; then +if [ "$COUNTRY" = "China" ]; then is_cn=true fi - - if [ "$is_cn" = true ]; then echo "Geolocation: China mainland detected" DOWNLOAD_URL="$CN_URL"