fix domain check issues

This commit is contained in:
233boy
2018-03-05 09:48:21 +08:00
parent 4f9a0f34f9
commit a72086ac24
2 changed files with 10 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ none='\e[0m'
# Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v1.5"
_version="v1.51"
cmd="apt-get"
@@ -1832,8 +1832,8 @@ change_proxy_site_config() {
}
domain_check() {
# test_domain=$(dig $new_domain +short)
test_domain=$(ping $domain -c 1 | grep -oP -m1 "([\d.]+){3}\d")
test_domain=$(dig $new_domain +short)
# test_domain=$(ping $domain -c 1 | grep -oP -m1 "([\d.]+){3}\d")
if [[ $test_domain != $ip ]]; then
echo
echo -e "$red 检测域名解析错误....$none"