Update install.sh

修复 域名dns解析IP 与 本机IP 不匹配 问题
pull/41/head
wulabing 2018-02-04 12:52:50 +08:00 committed by GitHub
parent 1d7a280d72
commit f16a37e32b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -220,7 +220,8 @@ domain_check(){
## stty erase '^H' && read -p "请输入公网 IP 所在网卡名称(default:eth0):" broadcast
## [[ -z ${broadcast} ]] && broadcast="eth0"
domain_ip=`ping ${domain} -c 1 | sed '1{s/[^(]*(//;s/).*//;q}'`
local_ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6 | awk '{print $2}' | tr -d "addr:"`
##local_ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6 | awk '{print $2}' | tr -d "addr:"`
local_ip=`curl ip.sb`
echo -e "域名dns解析IP${domain_ip}"
echo -e "本机IP: ${local_ip}"
sleep 2