Update get public IP address method
This commit is contained in:
parent
8b407e4887
commit
b0d506b766
|
|
@ -110,7 +110,7 @@ function pre_install(){
|
||||||
fi
|
fi
|
||||||
# Get IP address
|
# Get IP address
|
||||||
echo "Getting Public IP address, Please wait a moment..."
|
echo "Getting Public IP address, Please wait a moment..."
|
||||||
IP=$(curl -4 icanhazip.com)
|
IP=$(curl -s -4 icanhazip.com)
|
||||||
if [[ "$IP" = "" ]]; then
|
if [[ "$IP" = "" ]]; then
|
||||||
IP=$(curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}')
|
IP=$(curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}')
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ function pre_install(){
|
||||||
apt-get install -y wget unzip curl build-essential autoconf libtool libssl-dev
|
apt-get install -y wget unzip curl build-essential autoconf libtool libssl-dev
|
||||||
# Get IP address
|
# Get IP address
|
||||||
echo "Getting Public IP address, Please wait a moment..."
|
echo "Getting Public IP address, Please wait a moment..."
|
||||||
IP=$(curl -4 icanhazip.com)
|
IP=$(curl -s -4 icanhazip.com)
|
||||||
if [[ "$IP" = "" ]]; then
|
if [[ "$IP" = "" ]]; then
|
||||||
IP=$(curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}')
|
IP=$(curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}')
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -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
|
yum install -y automake make curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel
|
||||||
# Get IP address
|
# Get IP address
|
||||||
echo "Getting Public IP address, Please wait a moment..."
|
echo "Getting Public IP address, Please wait a moment..."
|
||||||
IP=$(curl -4 icanhazip.com)
|
IP=$(curl -s -4 icanhazip.com)
|
||||||
if [[ "$IP" = "" ]]; then
|
if [[ "$IP" = "" ]]; then
|
||||||
IP=`curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}'`
|
IP=`curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}'`
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ function pre_install(){
|
||||||
fi
|
fi
|
||||||
# Get IP address
|
# Get IP address
|
||||||
echo "Getting Public IP address, Please wait a moment..."
|
echo "Getting Public IP address, Please wait a moment..."
|
||||||
IP=$(curl -4 icanhazip.com)
|
IP=$(curl -s -4 icanhazip.com)
|
||||||
if [[ "$IP" = "" ]]; then
|
if [[ "$IP" = "" ]]; then
|
||||||
IP=$(curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}')
|
IP=$(curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}')
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user