From f16a37e32b087990480f22fa8761705089fb0309 Mon Sep 17 00:00:00 2001 From: wulabing Date: Sun, 4 Feb 2018 12:52:50 +0800 Subject: [PATCH] Update install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 域名dns解析IP 与 本机IP 不匹配 问题 --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f58d301..8d503df 100644 --- a/install.sh +++ b/install.sh @@ -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