]> git.pld-linux.org Git - packages/munin.git/commitdiff
- init script for munin client
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 5 Oct 2005 18:24:56 +0000 (18:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    munin-node.init -> 1.1

munin-node.init [new file with mode: 0644]

diff --git a/munin-node.init b/munin-node.init
new file mode 100644 (file)
index 0000000..deb2013
--- /dev/null
@@ -0,0 +1,56 @@
+#! /bin/sh
+#
+# munin-node   Control the Munin Node Server (formerly Linpro RRD client)
+#
+# chkconfig: 2345 90 10
+# description: munin node agents
+# processname: munin-node
+# config: /etc/munin/munin-node.conf
+# pidfile: /var/run/muin-node.pid
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+PROCNAME=munin-node
+
+mkdir -p /var/run/munin 2>/dev/null
+chown munin /var/run/munin
+
+# See how we were called.
+case "$1" in
+  start)
+       if [ ! -f /var/lock/subsys/munin-node ]; then
+               msg_starting "Munin Node"
+               daemon --fork --waitfortime 3 --waitforname munin-node munin-node
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/munin-node
+       else
+               msg_already_running "Munin Node"
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/munin-node ]; then
+               msg_stopping "Munin Node"
+               killproc munin-node
+               RETVAL=$?
+               rm -f /var/lock/subsys/munin-node >/dev/null 2>/dev/null
+       else
+               msg_not_running "Munin Node"
+       fi
+       ;;
+  status)
+       status munin-node
+       exit $?
+       ;;
+  restart|reload)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|status|restart}"
+       exit 1
+esac
+
+exit $RETVAL
This page took 0.123554 seconds and 4 git commands to generate.