#!/bin/sh
#
# $FreeBSD: ports/net/net-snmp/files/snmpd.sh.sample,v 1.4 2003/11/18 03:18:02 kuriyama Exp $
#
# PROVIDE: snmpd
# REQUIRE: DAEMON
# KEYWORD: FreeBSD
#
# Add the following line to /etc/rc.conf to enable snmpd:
#
# snmpd_enable="YES"
#

snmpd_enable="NO"
snmpd_flags="-p /var/run/snmpd.pid"

. /usr/local/etc/rc.subr

load_rc_config net_snmpd

if [ ! -z "$net_snmpd_enable" ]; then
    echo "Warning: \$net_snmpd_enable is obsoleted."
    echo "         Use \$snmpd_enable instead."
    snmpd_enable="$net_snmpd_enable"
    [ ! -z "$net_snmpd_flags" ] && snmpd_flags="$net_snmpd_flags"
fi

name=snmpd
rcvar=`set_rcvar`

command=/usr/local/sbin/snmpd
pidfile='/var/run/snmpd.pid'

load_rc_config $name
run_rc_command "$1"
