Update install.sh (#404)

pull/407/head
Misaka No 2022-05-28 08:04:40 +08:00 committed by GitHub
parent e4ce0627e6
commit 2c144252eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -229,14 +229,14 @@ function domain_check() {
if [[ ${wgcfv4_status} =~ "on"|"plus" ]] || [[ ${wgcfv6_status} =~ "on"|"plus" ]]; then
# 关闭wgcf-warp以防误判VPS IP情况
wg-quick down wgcf >/dev/null 2>&1
judge "已关闭 wgcf-warp"
print_ok "已关闭 wgcf-warp"
fi
local_ipv4=$(curl -s4m8 https://ip.gs)
local_ipv6=$(curl -s6m8 https://ip.gs)
if [[ -z ${local_ipv4} && -n ${local_ipv6} ]]; then
# 纯IPv6 VPS自动添加DNS64服务器以备acme.sh申请证书使用
echo -e nameserver 2a01:4f8:c2c:123f::1 > /etc/resolv.conf
judge "识别为 IPv6 Only 的 VPS自动添加 DNS64 服务器"
print_ok "识别为 IPv6 Only 的 VPS自动添加 DNS64 服务器"
fi
echo -e "域名通过 DNS 解析的 IP 地址:${domain_ip}"
echo -e "本机公网 IPv4 地址: ${local_ipv4}"
@ -407,7 +407,7 @@ function acme() {
sleep 2
if [[ -n $(type -P wgcf) && -n $(type -P wg-quick) ]]; then
wg-quick up wgcf >/dev/null 2>&1
judge "已启动 wgcf-warp"
print_ok "已启动 wgcf-warp"
fi
fi
else
@ -415,7 +415,7 @@ function acme() {
rm -rf "$HOME/.acme.sh/${domain}_ecc"
if [[ -n $(type -P wgcf) && -n $(type -P wg-quick) ]]; then
wg-quick up wgcf >/dev/null 2>&1
judge "已启动 wgcf-warp"
print_ok "已启动 wgcf-warp"
fi
exit 1
fi
@ -775,4 +775,4 @@ menu() {
;;
esac
}
menu "$@"
menu "$@"