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
|
# get stable ipv6 addr, fallback to ipv4, fallback to curl default
|
||||||
IF=$(
|
IF=$(
|
||||||
ip -6 -json addr show scope global -temporary \
|
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
|
| head -n1
|
||||||
)
|
)
|
||||||
if [[ -z "$IF" ]]; then
|
if [[ -z "$IF" ]]; then
|
||||||
IF=$(
|
IF=$(
|
||||||
ip -4 -json addr show scope global -temporary \
|
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
|
| head -n1
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user