Created
September 5, 2022 17:41
-
-
Save ravnoor/44fe0337c1ed15da54ab8c66c8ff672a to your computer and use it in GitHub Desktop.
Update dynamic ipv4 and ipv6 address on duckdns.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DUCKDNS_TOKEN=ffc3496761593d061e9cb57525855266 | |
IPV4=$(ip -json address list eth0 | jq -r '.[0].addr_info[] | select(.family=="inet" and .scope=="global") | .local') | |
IPV6=$(ip -json address list eth0 | jq -r '.[0].addr_info[] | select(.family=="inet6" and .scope=="global") | .local') | |
# echo ${IPV4} | |
# echo ${IPV6} | |
echo url="https://www.duckdns.org/update?domains=precision&token=${DUCKDNS_TOKEN}&ip=${IPV4}&ipv6=${IPV6}&verbose=true" | curl -k -o /root/infra/duckdns/duck.log -K - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment