diff --git a/install.sh b/install.sh index be3060a..24f40e2 100644 --- a/install.sh +++ b/install.sh @@ -674,7 +674,7 @@ domain_check() { # $cmd install dnsutils -y # fi # test_domain=$(dig $domain +short) - test_domain=$(ping $domain -c 1 | grep -oP -m1 "(\d+\.){3}\d+") + test_domain=$(ping $domain -c 1 | grep -oE -m1 "([0-9]{1,3}\.){3}[0-9]{1,3}") if [[ $test_domain != $ip ]]; then echo echo -e "$red 检测域名解析错误....$none" diff --git a/v2ray.old.sh b/v2ray.old.sh index 7068b2f..a20c1b5 100644 --- a/v2ray.old.sh +++ b/v2ray.old.sh @@ -10,7 +10,7 @@ none='\e[0m' # Root [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 -_version="v1.70" +_version="v1.71" cmd="apt-get" @@ -1861,7 +1861,7 @@ change_proxy_site_config() { } domain_check() { # test_domain=$(dig $new_domain +short) - test_domain=$(ping $new_domain -c 1 | grep -oP -m1 "(\d+\.){3}\d+") + test_domain=$(ping $new_domain -c 1 | grep -oE -m1 "([0-9]{1,3}\.){3}[0-9]{1,3}") if [[ $test_domain != $ip ]]; then echo echo -e "$red 检测域名解析错误....$none" diff --git a/v2ray.sh b/v2ray.sh index 41495bf..061fe93 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="v2.01" +_version="v2.02" cmd="apt-get" @@ -1899,7 +1899,7 @@ change_proxy_site_config() { } domain_check() { # test_domain=$(dig $new_domain +short) - test_domain=$(ping $new_domain -c 1 | grep -oP -m1 "(\d+\.){3}\d+") + test_domain=$(ping $new_domain -c 1 | grep -oE -m1 "([0-9]{1,3}\.){3}[0-9]{1,3}") if [[ $test_domain != $ip ]]; then echo echo -e "$red 检测域名解析错误....$none"