aboutsummaryrefslogtreecommitdiff
path: root/net/analyzer/munin/rc.munin-node
diff options
context:
space:
mode:
authorrudson <rudson@370017ae-e619-0410-ac65-c121f96126d4>2006-11-15 23:33:50 +0000
committerrudson <rudson@370017ae-e619-0410-ac65-c121f96126d4>2006-11-15 23:33:50 +0000
commit4c047569a7fb213df74643e7e92d8b82be8f25c8 (patch)
tree86d2886ceea65b7c5f3740172c9b77e4b4ad9bcf /net/analyzer/munin/rc.munin-node
parent36dfae9b5a58be5a5ad46c4741c0565eebc352d5 (diff)
downloadslackbuilds-4c047569a7fb213df74643e7e92d8b82be8f25c8.tar.gz
slackbuilds-4c047569a7fb213df74643e7e92d8b82be8f25c8.tar.bz2
movendo...
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@684 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'net/analyzer/munin/rc.munin-node')
-rwxr-xr-xnet/analyzer/munin/rc.munin-node30
1 files changed, 30 insertions, 0 deletions
diff --git a/net/analyzer/munin/rc.munin-node b/net/analyzer/munin/rc.munin-node
new file mode 100755
index 00000000..f7cec18d
--- /dev/null
+++ b/net/analyzer/munin/rc.munin-node
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# startup script for munin-node
+#
+
+PID_FILE="/var/run/munin/munin-node.pid"
+
+if [ -a "/var/run/munin/munin-node.pid" ]; then
+ NODE_PID="`cat $PID_FILE`"
+fi
+
+function munin_start {
+ /usr/sbin/munin-node
+}
+
+function munin_stop {
+ if [ "$NODE_PID" == "`pidof munin-node`" ]; then
+ kill $NODE_PID
+ fi
+}
+
+if [ "$1" == "start" ]; then
+ munin_start
+elif [ "$1" == "stop" ]; then
+ munin_stop
+elif [ "$1" == "restart" ]; then
+ munin_stop
+ munin_start
+fi
+