#!/bin/sh
#
# $FreeBSD: ports/net-mgmt/net-snmp/files/snmptrapd.sh.sample,v 1.1 2004/03/10 13:40:41 kuriyama Exp $
#
# PROVIDE: snmptrapd
# REQUIRE: DAEMON
# KEYWORD: FreeBSD
#
# Add the following line to /etc/rc.conf to enable snmptrapd:
#
# snmptrapd_enable="YES"
#

snmptrapd_enable="NO"
snmptrapd_flags="-p /var/run/snmptrapd.pid"

. /usr/local/etc/rc.subr

load_rc_config net_snmptrapd

if [ ! -z "$net_snmptrapd_enable" ]; then
    echo "Warning: \$net_snmptrapd_enable is obsoleted."
    echo "         Use \$snmptrapd_enable instead."
    snmptrapd_enable="$net_snmptrapd_enable"
    [ ! -z "$net_snmptrapd_flags" ] && snmptrapd_flags="$net_snmptrapd_flags"
fi

name=snmptrapd
rcvar=`set_rcvar`

command=/usr/local/sbin/${name}
pidfile=/var/run/${name}.pid

load_rc_config ${name}
run_rc_command "$1"
