#!/bin/sh

# This is an example script for implementing simple redundancy.
# Read the HTML documentation on redundant monitoring for more
# information on what this does.

# Only take action on hard host states...
case "$2" in
HARD)
	case "$1" in
	DOWN)
	UNREACHABLE)
		# The router has gone down or has become unreachable!
		# We should now become the master host and take
		# over the responsibilities of monitoring the 
		# network, so enter active mode...
		/usr/local/netsaint/libexec/eventhandlers/enter_active_mode
		;;
	UP)
		# The router has recovered!
		# We should go back to being the slave host and
		# let the master host do the monitoring, so 
		# enter standby mode...
		/usr/local/netsaint/libexec/eventhandlers/enter_standby_mode
		;;
	esac
	;;
esac
exit 0

