#!/bin/sh #this is your dyn host export DYNURL="deine_dyn_url" #this you username export USER="dein_user" #this you password export PASS="dein_passwort" export PIP="$(wget -qO- ipv4.icanhazip.com)" export PIP6="$(wget -qO- ipv6.icanhazip.com)" export DIP="$(nslookup "$DYNURL" | awk '/^Address: / { print $2 }')" #here comes your url to dynamic-powerdns with your password export UPDATESTRING="https://die_url_zur_dynupdate.php?ipaddr="$PIP"&username="$USER"&password="$PASS"&domain="$DYNURL"&ip6addr="$PIP6"" echo $PIP echo $PIP6 echo $DIP if [ "$PIP" = "$DIP" ] then echo "same IP - nothing to do" elif [ "$PIP" = "" ] then echo "Can't obtain IP Adress - check Network connection!" elif [ "$DIP" = "" ] then echo "Call Dynhost Admin his Server is down!!!" logger warning Call dynhost Admin his Server is Down #can be deleted if you have systemd else wget -qO- $UPDATESTRING fi