#! /bin/sh

if ([ $reason == "BOUND" ] && [ "$old_ip_address" != "$new_ip_address" ]); then
     logger -pdaemon.crit "ip changed - restart twonky"
	/etc/init.d/twonky status >/dev/null 2>/dev/null
	if [ $? == 0 ]; then 
		/etc/init.d/twonky restart >/dev/null 2>&1 || true
	fi
fi
