#!/bin/sh # # $FreeBSD$ # # PROVIDE: snmptt # REQUIRE: LOGIN # # Add the following lines to /etc/rc.conf to enable snmptt: # # snmptt_enable="YES" # snmptt_flags="" # # See snmptt documentation for flags. # . %%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"