ddns-scripts/force_v4_update.sh

12 lines
314 B
Bash
Raw Normal View History

2018-11-07 21:17:56 +01:00
#!/bin/bash
DDNS_V4=$(dig companioncu.be A +short @ns.geekify.de)
PUBLIC_V4=$(ip -f inet addr show ppp0 | awk '/inet / {print $2}')
2024-09-26 18:01:32 +02:00
if [ "$DDNS_V4" != "$PUBLIC_V4" ] || [ "$1" == "-f" ]; then
2018-11-07 21:17:56 +01:00
bash "$(dirname $0)/multiupdater.sh" "THESE" "DONOT" "MATTER" "$PUBLIC_V4"
2024-09-26 18:01:32 +02:00
else
echo "no update needed"
exit 0
2018-11-07 21:17:56 +01:00
fi