Skip to content

Commit

Permalink
fix centos7 check domain ip addr issues
Browse files Browse the repository at this point in the history
  • Loading branch information
233boy committed Apr 21, 2018
1 parent 20ea424 commit b90a947
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions v2ray.old.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions v2ray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit b90a947

Please sign in to comment.