ddns-scripts/force_v6_update.sh

14 lines
402 B
Bash
Raw Normal View History

2024-09-26 18:01:32 +02:00
#!/bin/bash
DDNS_V6=$(dig companioncu.be AAAA +short @ns.geekify.de)
PUBLIC_V6=$(ip -f inet6 addr show ppp0 | grep "scope global" | grep -v "temporary" | awk '/inet6/ {print $2}' | cut -d"/" -f 1)
if [ "$DDNS_V6" != "$PUBLIC_V6" ] || [ "$1" == "-f" ]; then
export reason=ROUTERADVERT
export nd1_addr1=$PUBLIC_V6
bash "$(dirname $0)/multiupdater.sh"
else
#echo "no update needed"
exit 0
fi