From b0d506b766d31c09f364d199ea5f067bd0da4a00 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Tue, 31 Mar 2015 16:23:20 +0800 Subject: [PATCH] Update get public IP address method --- shadowsocks-go.sh | 2 +- shadowsocks-libev-debian.sh | 2 +- shadowsocks-libev.sh | 2 +- shadowsocks.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shadowsocks-go.sh b/shadowsocks-go.sh index 0fbfd44..8e3ce35 100644 --- a/shadowsocks-go.sh +++ b/shadowsocks-go.sh @@ -110,7 +110,7 @@ function pre_install(){ fi # Get IP address echo "Getting Public IP address, Please wait a moment..." - IP=$(curl -4 icanhazip.com) + IP=$(curl -s -4 icanhazip.com) if [[ "$IP" = "" ]]; then IP=$(curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}') fi diff --git a/shadowsocks-libev-debian.sh b/shadowsocks-libev-debian.sh index f6cfab6..34874e4 100644 --- a/shadowsocks-libev-debian.sh +++ b/shadowsocks-libev-debian.sh @@ -73,7 +73,7 @@ function pre_install(){ apt-get install -y wget unzip curl build-essential autoconf libtool libssl-dev # Get IP address echo "Getting Public IP address, Please wait a moment..." - IP=$(curl -4 icanhazip.com) + IP=$(curl -s -4 icanhazip.com) if [[ "$IP" = "" ]]; then IP=$(curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}') fi diff --git a/shadowsocks-libev.sh b/shadowsocks-libev.sh index 717207d..2766cc4 100644 --- a/shadowsocks-libev.sh +++ b/shadowsocks-libev.sh @@ -87,7 +87,7 @@ function pre_install(){ yum install -y automake make curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel # Get IP address echo "Getting Public IP address, Please wait a moment..." - IP=$(curl -4 icanhazip.com) + IP=$(curl -s -4 icanhazip.com) if [[ "$IP" = "" ]]; then IP=`curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}'` fi diff --git a/shadowsocks.sh b/shadowsocks.sh index 7c1928e..b6abfb3 100644 --- a/shadowsocks.sh +++ b/shadowsocks.sh @@ -107,7 +107,7 @@ function pre_install(){ fi # Get IP address echo "Getting Public IP address, Please wait a moment..." - IP=$(curl -4 icanhazip.com) + IP=$(curl -s -4 icanhazip.com) if [[ "$IP" = "" ]]; then IP=$(curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}') fi