UPDATEURL="http://dynmhc.de/?hostname=domain" DOMAIN="domain.dynmhc.de" registered=$(dig $DOMAIN @a.ns14.net | grep $DOMAIN | grep -v "^;" | awk -- '{print $5}') current=$(wget -q -O - http://checkip.dyndns.org|sed s/[^0-9.]//g) [ "$current" != "$registered" ] && { wget -q -O /dev/null $UPDATEURL #echo "DNS updated on:"; date }