freebsd-ports/security/sguil-sensor/files/snort_agent.in
Doug Barton 9aac569eaa Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file

No PORTREVISION bump necessary because this is a no-op
2012-08-05 23:19:36 +00:00

34 lines
987 B
Bash

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