#!/bin/sh #this is your dyn host export DYNURL="dyn.url.com" #here comes your url to dynamic-powerdns with your password export UPDATESTRING="https://url.zum.dynamic-powerdns/?KEY" export PIP="$(wget -qO- ipv4.icanhazip.com)" export DIP="$(nslookup "$DYNURL" | awk '/^Address: / { print $2 }')" 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