mirror of
https://github.com/TheyCallMeSecond/sing-box-manager.git
synced 2024-11-16 03:32:31 +08:00
Update Install.sh
This commit is contained in:
parent
051d010aa3
commit
9672514a42
|
@ -1316,10 +1316,11 @@ function prompt_and_check_bound_domain() {
|
||||||
read -p "请输入域名(用于自动申请证书): " input_domain
|
read -p "请输入域名(用于自动申请证书): " input_domain
|
||||||
|
|
||||||
local_ip=$(hostname -I | awk '{print $1}')
|
local_ip=$(hostname -I | awk '{print $1}')
|
||||||
resolved_ip=$(dig +short "$input_domain")
|
resolved_ipv4=$(dig +short A "$input_domain")
|
||||||
|
resolved_ipv6=$(dig +short AAAA "$input_domain")
|
||||||
|
|
||||||
if [[ "$resolved_ip" != "$local_ip" ]]; then
|
if [[ "$resolved_ipv4" != "$local_ip" && "$resolved_ipv6" != "$local_ip" ]]; then
|
||||||
echo -e "${RED}错误:域名未绑定本机IP,请重新输入。${NC}"
|
echo "错误:域名未绑定本机IP,请重新输入。"
|
||||||
prompt_and_check_bound_domain
|
prompt_and_check_bound_domain
|
||||||
else
|
else
|
||||||
domain="$input_domain"
|
domain="$input_domain"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user