aboutsummaryrefslogtreecommitdiff
path: root/sysutils/munin-node/files/munin_node.sh
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2004-12-14 01:44:54 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2004-12-14 01:44:54 +0000
commit738dbaa8abdbb501014f6879255f2eebf3aac18d (patch)
treedab03ce9630e24ad79847929798a9f9981b722b4 /sysutils/munin-node/files/munin_node.sh
parentd1fe1cbc7c11aea833498ee115fe885fad59b5ba (diff)
Add files forgoten with the last commit.
Notes
Notes: svn path=/head/; revision=123976
Diffstat (limited to 'sysutils/munin-node/files/munin_node.sh')
-rw-r--r--sysutils/munin-node/files/munin_node.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/sysutils/munin-node/files/munin_node.sh b/sysutils/munin-node/files/munin_node.sh
new file mode 100644
index 000000000000..1a174ec64c14
--- /dev/null
+++ b/sysutils/munin-node/files/munin_node.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+
+# PROVIDE: munin-node
+# REQUIRE: DAEMON
+# BEFORE: cron
+# KEYWORD: FreeBSD
+
+#
+# Add the following lines to /etc/rc.conf to enable munin-node:
+# munin_node_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable munin-node
+# munin_node_config (path): Set to "%PREFIX%/etc/munin/munin-node.conf" by default.
+#
+
+. /etc/rc.subr
+
+name="munin_node"
+rcvar=`set_rcvar`
+
+[ -z "$munin_node_enable" ] && munin_node_enable="NO"
+[ -z "$munin_node_config" ] && munin_node_config="/usr/local/etc/munin/munin-node.conf"
+
+command="/usr/local/sbin/munin-node"
+pidfile=`awk '$1 == "pid_file" { print $2 }' $munin_node_config`
+
+load_rc_config $name
+run_rc_command "$1"