fix get ip err

This commit is contained in:
233boy
2023-08-08 15:12:44 +08:00
parent 83d1e045a9
commit 463ff482ea
3 changed files with 6 additions and 6 deletions

View File

@@ -189,8 +189,8 @@ download() {
# get server ip
get_ip() {
export "$(_wget -4 -qO- https://cloudflare-dns.com/cdn-cgi/trace | grep ip=)" &>/dev/null
[[ -z $ip ]] && export "$(_wget -6 -qO- https://cloudflare-dns.com/cdn-cgi/trace | grep ip=)" &>/dev/null
export "$(_wget -4 -qO- https://one.one.one.one/cdn-cgi/trace | grep ip=)" &>/dev/null
[[ -z $ip ]] && export "$(_wget -6 -qO- https://one.one.one.one/cdn-cgi/trace | grep ip=)" &>/dev/null
}
# check background tasks status