From a72086ac245784e7854fb9168cc5b62e13e14a99 Mon Sep 17 00:00:00 2001 From: 233boy Date: Mon, 5 Mar 2018 09:48:21 +0800 Subject: [PATCH] fix domain check issues --- install.sh | 14 +++++++------- v2ray.sh | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 38a9fa7..1d30d59 100644 --- a/install.sh +++ b/install.sh @@ -660,13 +660,13 @@ install_info() { } domain_check() { - # if [[ $cmd == "yum" ]]; then - # yum install bind-utils -y - # else - # $cmd install dnsutils -y - # fi - # test_domain=$(dig $domain +short) - test_domain=$(ping $domain -c 1 | grep -oP -m1 "([\d.]+){3}\d") + if [[ $cmd == "yum" ]]; then + yum install bind-utils -y + else + $cmd install dnsutils -y + fi + test_domain=$(dig $domain +short) + # test_domain=$(ping $domain -c 1 | grep -oP -m1 "([\d.]+){3}\d") if [[ $test_domain != $ip ]]; then echo echo -e "$red 检测域名解析错误....$none" diff --git a/v2ray.sh b/v2ray.sh index b0bb666..02d5a0e 100644 --- a/v2ray.sh +++ b/v2ray.sh @@ -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"