summaryrefslogtreecommitdiff
path: root/security/sguil-sensor/files/example_agent.in
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2012-08-05 23:19:36 +0000
committerDoug Barton <dougb@FreeBSD.org>2012-08-05 23:19:36 +0000
commit9aac569eaa031e27191a3f4165b389a17f467ad2 (patch)
tree1ed78841e1757014ccc09581c61c3683992d3f77 /security/sguil-sensor/files/example_agent.in
parentWhen installing in the base, USE_RCORDER does the right thing without (diff)
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
Diffstat (limited to 'security/sguil-sensor/files/example_agent.in')
-rw-r--r--security/sguil-sensor/files/example_agent.in34
1 files changed, 34 insertions, 0 deletions
diff --git a/security/sguil-sensor/files/example_agent.in b/security/sguil-sensor/files/example_agent.in
new file mode 100644
index 000000000000..79b449745ea3
--- /dev/null
+++ b/security/sguil-sensor/files/example_agent.in
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+# PROVIDE: example_agent
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+# Add the following line to /etc/rc.conf to enable example_agent:
+# example_agent_enable (bool): Set to YES to enable example_agent
+# Default: NO
+# example_agent_conf (str): Example_agent configuration file
+# Default: %%PREFIX%%/etc/%%SGUILDIR%%/example_agent.conf
+# example_agent_flags (str): Default: -D
+#
+
+. /etc/rc.subr
+
+load_rc_config example_agent
+
+#set defaults
+example_agent_enable=${example_agent_enable:-"NO"}
+example_agent_conf=${example_agent_conf:-"%%PREFIX%%/etc/%%SGUILDIR%%/example_agent.conf"}
+example_agent_flags=${example_agent_flags:-"-D"}
+
+name="example_agent"
+rcvar=example_agent_enable
+command="%%PREFIX%%/bin/%%SGUILDIR%%/example_agent.tcl"
+command_args="-c ${example_agent_conf} ${example_agent_flags}"
+procname="%%PREFIX%%/bin/tclsh8.4"
+pidfile="/var/run/${name}.pid"
+check_pidfile="${pidfile} ${procname} /bin/sh"
+
+run_rc_command "$1"