freebsd-skq/etc/rc.d/bsnmpd

29 lines
468 B
Plaintext
Raw Normal View History

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: bsnmpd
# REQUIRE: NETWORKING syslogd
# KEYWORD: nojail shutdown
. /etc/rc.subr
name="bsnmpd"
rcvar="bsnmpd_enable"
command="/usr/sbin/${name}"
start_cmd="bsnmpd_start"
bsnmpd_start()
{
rc_flags="-p ${pidfile} ${bsnmpd_flags}"
echo -n "Starting bsnmpd"
su -m $user -c "$command ${rc_flags}"
echo "."
}
load_rc_config $name
user="${bsnmpd_username:-root}"
pidfile="${bsnmpd_pidfile:-/var/run/snmpd.pid}"
run_rc_command "$1"