fix domain check issues

pull/17/head
233boy 7 years ago
parent 4f9a0f34f9
commit a72086ac24
  1. 14
      install.sh
  2. 6
      v2ray.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"

@ -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"

Loading…
Cancel
Save