#!/bin/sh IP=`echo $SSH_CLIENT | awk '{print $1}'` OLDIP=`cat ~/.ip` if [ "$IP" != "$OLDIP" ] ; then echo $IP > ~/.ip mdns $IP fi