#!/bin/sh # PROVIDE: dtcps # BEFORE: LOGIN # KEYWORD: FreeBSD shutdown # # Add the following line to /etc/rc.conf to enable `dtcps': # # dtcps_enable="YES" # # static allocation example line to /etc/rc.conf # cloned_interfaces="gif10 gif11 gif12 gif13 .." # . /etc/rc.subr name="dtcps" rcvar=`set_rcvar` dtcps_command="/usr/local/sbin/${name}" load_rc_config $name dtcps_enable=${dtcps_enable:-"NO"} dtcps_pidfile=${snmpd_pidfile-"/var/run/dtcps.pid"} dtcps_tunif=${dtcps_tunif:=""} dtcps_prefix=${dtcps_prefix:=""} dtcps_flags=${dtcps_prefix:=""} start_cmd="dtcps_start" stop_cmd="dtcps_stop" status_cmd="dtcps_status" reload_cmd="dtcps_reload" dtcps_start() { command="${dtcps_command} -i ${dtcps_tunif} ${dtcps_flags} ${dtcps_prefix}" ${command} echo "${command}" echo "Starting dtcps." } dtcps_stop() { /bin/kill -TERM `cat ${dtcps_pidfile}` > /dev/null 2>&1 /bin/rm -f ${dtcps_pidfile} echo "Stopping dtcps." } dtcps_reload() { /usr/local/etc/rc.d/dtcps stop /usr/local/etc/rc.d/dtcps start } run_rc_command "$1"