#!/bin/sh # $FreeBSD: head/security/sguil-sensor/files/pcap_agent.in 312466 2013-02-18 00:56:47Z miwi $ # 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): Pcap_agent configuration file # Default: %%PREFIX%%/etc/%%SGUILDIR%%/pcap_agent.conf # pcap_agent_flags (str): Default: -D # . /etc/rc.subr name="pcap_agent" rcvar=pcap_agent_enable load_rc_config pcap_agent #set defaults : ${pcap_agent_enable:="NO"} : ${pcap_agent_conf:="%%PREFIX%%/etc/%%SGUILDIR%%/pcap_agent.conf"} : ${pcap_agent_flags:="-D -c ${pcap_agent_conf}"} command="%%PREFIX%%/bin/%%SGUILDIR%%/pcap_agent.tcl" procname="%%PREFIX%%/bin/%%TCLSH%%" pidfile="/var/run/${name}.pid" run_rc_command "$1"