#!/bin/sh

#
# You probably want to set the path to include
# nothing but local filesystems.
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
export PATH

M=/usr/lib/mon

case "$1" in
    start)
	if [ -x $M/mon ]
	then
	    $M/mon -c $M/mon.cf -a $M/alert.d \
	    	-s $M/mon.d -f 2>/dev/null
	fi
	;;
    stop)
	$M/moncmd -d term
	;;
    *)
    	echo "Usage: mon {start|stop}"
	exit 1
esac

exit 0
