2005-04-17 10:47:58 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: bsnmpd
|
|
|
|
# REQUIRE: NETWORKING syslogd
|
2008-07-16 19:50:29 +00:00
|
|
|
# KEYWORD: nojail shutdown
|
2005-04-17 10:47:58 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="bsnmpd"
|
2012-01-14 02:18:41 +00:00
|
|
|
rcvar="bsnmpd_enable"
|
2005-04-17 10:47:58 +00:00
|
|
|
command="/usr/sbin/${name}"
|
2013-08-19 04:56:03 +00:00
|
|
|
start_cmd="bsnmpd_start"
|
|
|
|
|
|
|
|
bsnmpd_start()
|
|
|
|
{
|
|
|
|
rc_flags="-p ${pidfile} ${bsnmpd_flags}"
|
|
|
|
echo -n "Starting bsnmpd"
|
|
|
|
su -m $user -c "$command ${rc_flags}"
|
|
|
|
echo "."
|
|
|
|
}
|
2005-04-17 10:47:58 +00:00
|
|
|
|
|
|
|
load_rc_config $name
|
2013-08-19 04:56:03 +00:00
|
|
|
user="${bsnmpd_username:-root}"
|
|
|
|
pidfile="${bsnmpd_pidfile:-/var/run/snmpd.pid}"
|
2005-04-17 10:47:58 +00:00
|
|
|
run_rc_command "$1"
|