#!/bin/sh # $FreeBSD$ # PROVIDE: pads_agent # REQUIRE: DAEMON # KEYWORD: shutdown # Add the following line to /etc/rc.conf to enable pads_agent: # pads_agent_enable (bool): Set to YES to enable pads_agent # Default: NO # pads_agent_conf (str): Pads_agent configuration file # Default: %%PREFIX%%/etc/%%SGUILDIR%%/pads_agent.conf # pads_agent_flags (str): Default: -D # . /etc/rc.subr load_rc_config pads_agent #set defaults pads_agent_enable=${pads_agent_enable:-"NO"} pads_agent_conf=${pads_agent_conf:-"%%PREFIX%%/etc/%%SGUILDIR%%/pads_agent.conf"} pads_agent_flags=${pads_agent_flags:-"-D"} name="pads_agent" rcvar=`set_rcvar` command="%%PREFIX%%/bin/%%SGUILDIR%%/pads_agent.tcl" command_args="-c ${pads_agent_conf} ${pads_agent_flags}" procname="%%PREFIX%%/bin/tclsh8.4" pidfile="/var/run/${name}.pid" check_pidfile="${pidfile} ${procname} /bin/sh" run_rc_command "$1"