mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-26 00:55:14 +00:00
9aac569eaa
Where necessary add $FreeBSD$ to the file No PORTREVISION bump necessary because this is a no-op
45 lines
781 B
Bash
45 lines
781 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: snmptt
|
|
# REQUIRE: LOGIN
|
|
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable snmptt:
|
|
#
|
|
# snmptt_enable="YES"
|
|
# snmptt_flags="<set as needed>"
|
|
#
|
|
# See snmptt documentation for flags.
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=snmptt
|
|
rcvar=snmptt_enable
|
|
|
|
command=%%PREFIX%%/sbin/${name}
|
|
command_args=">/dev/null --daemon"
|
|
pidfile=/var/run/${name}.pid
|
|
# XXX: Makes assumptions about the interpreter path and version. However,
|
|
# USE_PERL5 should guarantee that this path is valid. In any event, we
|
|
# don't sed-ify the #! operators.
|
|
procname=/usr/bin/perl
|
|
required_files=%%PREFIX%%/etc/snmp/${name}.ini
|
|
|
|
# set defaults
|
|
|
|
snmptt_enable=${snmptt_enable:-"NO"}
|
|
|
|
stop_postcmd=stop_postcmd
|
|
|
|
stop_postcmd()
|
|
{
|
|
rm -f $pidfile
|
|
}
|
|
|
|
load_rc_config ${name}
|
|
run_rc_command "$1"
|