#!/bin/sh

. /etc/rc.conf

case $1 in
autostart)
	test x"${snmpd:-NO}" = x"NO" && exit 0
	exec $0 start
	;;
start)
	[ -d /var/lib/snmp ] || mkdir -p /var/lib/snmp
	snmpd ${snmpd_flags}
	;;
stop)
	killall snmpd
	;;
restart)
	$0 stop
	$0 start
	;;
*)
	echo "Usage: $0 {start | stop | restart}"
	exit 1
	;;
esac
exit $?
