mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-22 04:17:44 +00:00
1d6b4b3f91
s#. %%RC_SUBR%%#. /etc/rc.subr#
45 lines
779 B
Bash
45 lines
779 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=`set_rcvar`
|
|
|
|
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"
|