#!/bin/bash # check delay (seconds) CHECKDELAY=5 CURRENTIP="$(lynx --dump checkip.dyndns.org | awk '/IP/{ print $NF; }')" logger -t ipupdater "Started. Current official IP: $CURRENTIP; Scan delay: $CHECKDELAY seconds." while sleep $CHECKDELAY; do NEWIP="$(lynx --dump checkip.dyndns.org | awk '/IP/{ print $NF; }')" if [ "$CURRENTIP" != "$NEWIP" ]; then logger -t ipupdater "IP seems to have changed to $NEWIP. Calling ddclient." CURRENTIP="$NEWIP" echo call ddclient with proper options here fi done