#!/bin/sh client="zodac_keller" data4=$(curl -4 -s "http://ip.codevoid.de/?client=$client") ip4=$(echo "$data4" | cut -d" " -f1) data6=$(curl -6 -s "http://ip.codevoid.de/?client=$client") ip6=$(echo "$data4" | cut -d" " -f1) echo "$data4" | fgrep -q "(changed)" \ && changed=4 echo "$data6" | fgrep -q "(changed)" \ && changed="${changed}6" case $changed in "4") echo "update with v4 addr $ip4"; ;; "6") echo "update with v6 addr $ip6"; ;; "46") echo "update with v4 addr $ip4 and v6 addr $ip6"; ;; esac