From ce8239e66c9a754bf97dd925382bad80a90f9a47 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 28 Jun 2021 15:39:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=8F=AF=E4=BB=A5=E8=AE=BF=E9=97=AE=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E4=BD=BF=E7=94=A8=E6=9C=AC=E5=9C=B0=E7=9A=84?= =?UTF-8?q?dns=E8=A7=A3=E6=9E=90=E7=9A=84ip=E4=BB=A5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 29f9ddc..dc783ab 100644 --- a/install.sh +++ b/install.sh @@ -167,6 +167,7 @@ initVar() { # pingIPv6 pingIPv4 # pingIPv4= + pingIP= pingIPv6= # 集成更新证书逻辑不再使用单独的脚本--RenewTLS @@ -645,7 +646,7 @@ initTLSNginxConfig() { # 测试nginx echoContent yellow "\n检查Nginx是否正常访问" sleep 0.5 - domainResult=$(curl -s "${domain}/test" | grep fjkvymb6len) + domainResult=$(curl -s "${domain}/test" --resolve "${domain}:80:${pingIP}" | grep fjkvymb6len) if [[ -n ${domainResult} ]]; then handleNginx stop echoContent green "\n ---> Nginx配置成功" @@ -725,7 +726,7 @@ EOF # 检查ip checkIP() { echoContent skyBlue " ---> 检查ipv4中" - local pingIP=$(curl -s -H 'accept:application/dns-json' 'https://cloudflare-dns.com/dns-query?name='${domain}'&type=A' | jq -r ".Answer|.[]|select(.type==1)|.data") + pingIP=$(curl -s -H 'accept:application/dns-json' 'https://cloudflare-dns.com/dns-query?name='${domain}'&type=A' | jq -r ".Answer|.[]|select(.type==1)|.data") if [[ -z "${pingIP}" ]]; then echoContent skyBlue " ---> 检查ipv6中"