#!/bin/sh
## Konfiguration:
token='PMPxxxxxxxxxyyyyyyyyyyyyzzzzzzzzzL'
hostname='unsergatewayserver.dynv6.net'
## Und los:
aktstate=`ip addr | grep inet6 | md5sum | awk '{print $1}'`
content=1234
content=$(cat /tmp/dynv6.state)
#echo $aktstate vs $content
if [ "$aktstate" != "$content" ];then
date
/usr/bin/curl "https://ipv4.dynv6.com/api/update?token=${token};hostname=${hostname};ipv4=auto"
/usr/bin/curl "https://ipv6.dynv6.com/api/update?token=${token};hostname=${hostname};ipv6=auto"
echo $aktstate > /tmp/dynv6.state
#else
#	date
#	echo Keine Aenderung in der IP-Adresse
fi