#!/bin/sh # $FreeBSD$ # PROVIDE: pcap_agent # REQUIRE: DAEMON # KEYWORD: shutdown # Add the following line to /etc/rc.conf to enable pcap_agent: # pcap_agent_enable (bool): Set to YES to enable pcap_agent # Default: NO # pcap_agent_conf (str): Sensor_agent configuration file # Default: %%PREFIX%%/etc/%%SGUILDIR%%/pcap_agent.conf # . %%RC_SUBR%% name="pcap_agent" rcvar=`set_rcvar` command="%%PREFIX%%/bin/%%SGUILDIR%%/pcap_agent.tcl" procname="%%PREFIX%%/bin/tclsh8.4" pidfile="/var/run/${name}.pid" check_pidfile="${pidfile} ${procname} /bin/sh" [ -z "$pcap_agent_enable" ] && pcap_agent_enable="NO" [ -z "$pcap_agent_conf" ] && pcap_agent_conf="%%PREFIX%%/etc/%%SGUILDIR%%/pcap_agent.conf" load_rc_config $name run_rc_command "$1"