fix dyndns
This commit is contained in:
parent
cb47e6f04a
commit
617b8732fe
@ -51,13 +51,13 @@ in
|
||||
# get stable ipv6 addr, fallback to ipv4, fallback to curl default
|
||||
IF=$(
|
||||
ip -6 -json addr show scope global -temporary \
|
||||
| jq '.[]| select(.ifname|contains("docker")|not) | .addr_info[].local | select(.==null|not)' -r \
|
||||
| jq '.[]| select(.ifname|contains("docker") or contains("tailscale")|not) | .addr_info[].local | select(.==null|not)' -r \
|
||||
| head -n1
|
||||
)
|
||||
if [[ -z "$IF" ]]; then
|
||||
IF=$(
|
||||
ip -4 -json addr show scope global -temporary \
|
||||
| jq '.[]| select(.ifname|contains("docker")|not) | .addr_info[].local | select(.==null|not)' -r \
|
||||
| jq '.[]| select(.ifname|contains("docker") or contains("tailscale")|not) | .addr_info[].local | select(.==null|not)' -r \
|
||||
| head -n1
|
||||
)
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user