ddns-scripts/force_v4_update.sh
2024-09-26 18:01:32 +02:00

12 lines
314 B
Bash
Executable file

#!/bin/bash
DDNS_V4=$(dig companioncu.be A +short @ns.geekify.de)
PUBLIC_V4=$(ip -f inet addr show ppp0 | awk '/inet / {print $2}')
if [ "$DDNS_V4" != "$PUBLIC_V4" ] || [ "$1" == "-f" ]; then
bash "$(dirname $0)/multiupdater.sh" "THESE" "DONOT" "MATTER" "$PUBLIC_V4"
else
echo "no update needed"
exit 0
fi