Fix get IP address backup method
This commit is contained in:
parent
819744a3b9
commit
99fed4ad51
|
|
@ -91,8 +91,8 @@ function pre_install(){
|
|||
# Get IP address
|
||||
echo "Getting Public IP address, Please wait a moment..."
|
||||
IP=`curl -s checkip.dyndns.com | cut -d' ' -f 6 | cut -d'<' -f 1`
|
||||
if [ -z $IP ]; then
|
||||
IP=`curl -s ifconfig.me/ip`
|
||||
if [ $? -ne 0 -o -z $IP ]; then
|
||||
IP=`curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}'`
|
||||
fi
|
||||
echo -e "Your main public IP is\t\033[32m$IP\033[0m"
|
||||
echo ""
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ function pre_install(){
|
|||
# Get IP address
|
||||
echo "Getting Public IP address, Please wait a moment..."
|
||||
IP=`curl -s checkip.dyndns.com | cut -d' ' -f 6 | cut -d'<' -f 1`
|
||||
if [ -z $IP ]; then
|
||||
IP=`curl -s ifconfig.me/ip`
|
||||
if [ $? -ne 0 -o -z $IP ]; then
|
||||
IP=`curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}'`
|
||||
fi
|
||||
#Current folder
|
||||
cur_dir=`pwd`
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ function pre_install(){
|
|||
# Get IP address
|
||||
echo "Getting Public IP address, Please wait a moment..."
|
||||
IP=`curl -s checkip.dyndns.com | cut -d' ' -f 6 | cut -d'<' -f 1`
|
||||
if [ -z $IP ]; then
|
||||
IP=`curl -s ifconfig.me/ip`
|
||||
if [ $? -ne 0 -o -z $IP ]; then
|
||||
IP=`curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}'`
|
||||
fi
|
||||
echo -e "Your main public IP is\t\033[32m$IP\033[0m"
|
||||
echo ""
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ function pre_install(){
|
|||
# Get IP address
|
||||
echo "Getting Public IP address, Please wait a moment..."
|
||||
IP=`curl -s checkip.dyndns.com | cut -d' ' -f 6 | cut -d'<' -f 1`
|
||||
if [ -z $IP ]; then
|
||||
IP=`curl -s ifconfig.me/ip`
|
||||
if [ $? -ne 0 -o -z $IP ]; then
|
||||
IP=`curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}'`
|
||||
fi
|
||||
echo -e "Your main public IP is\t\033[32m$IP\033[0m"
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user