aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/snmptt/files/snmptt.in
blob: 5a811a82cab0203abd4344e20353dbe80b4fe974 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: snmptt
# REQUIRE: LOGIN

#
# Add the following lines to /etc/rc.conf to enable snmptt:
#
# snmptt_enable:    Set to NO by default. Set it to YES to enable it.
# snmptt_user:      The user account snmptt runs as what
#                   you want it to be. It uses 'snmptt' user by
#                   default.
# snmptt_flags:     See snmptt documentation for flags.
#

. /etc/rc.subr

name=snmptt
rcvar=${name}_enable

command=%%PREFIX%%/sbin/${name}
command_args="--daemon > /dev/null 2>&1"
command_interpreter=%%PERL%%

load_rc_config ${name}

: ${snmptt_enable:="NO"}
: ${snmptt_user:="snmptt"}

required_files=%%PREFIX%%/etc/snmp/${name}.ini

run_rc_command "$1"