#!/bin/sh cache=.update_ip.cache server=ns1.example.com zone=dyn.example.com host=desktop secret="" ip=$(wget -q -O - http://treehouse.org.za/ip) if [ -z ${ip} ] || [ -z ${cache} ]; then exit; fi if [ -f "${HOME}/${cache}" ]; then old_ip=$(cat "${HOME}/${cache}") fi if [ "${ip}" = "${old_ip}" ]; then exit; else rm -f "${HOME}/${cache}" echo "${ip}" > "${HOME}/${cache}" fi cat <