fix dyndns

This commit is contained in:
Peder Bergebakken Sundt 2025-01-11 16:42:12 +01:00
parent cb47e6f04a
commit 617b8732fe

View File

@ -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