- init file for collectd
authorluzik <luzik@pld-linux.org>
Mon, 26 May 2008 07:45:34 +0000 (07:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    collectd.init -> 1.1

collectd.init [new file with mode: 0644]

diff --git a/collectd.init b/collectd.init
new file mode 100644 (file)
index 0000000..d2c89a9
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# collectd     collectd (collectd daemon)
+#
+# chkconfig:   345 93 11
+#
+# description: utility that colect various system information  \
+#              into rrd files \
+
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get service config
+[ -f /etc/sysconfig/collectd ] && . /etc/sysconfig/collectd
+
+
+
+RETVAL=0
+
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/collectd ]; then
+               msg_starting collectd
+               daemon /usr/sbin/collectd
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/collectd
+       else
+               msg_already_running collectd
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/collectd ]; then
+               msg_stopping collectd
+               killproc collectd
+               rm -f /var/lock/subsys/collectd >/dev/null 2>&1
+       else
+               msg_not_running collectd
+       fi
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  status)
+       status collectd
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|status}"
+       exit 3
+esac
+
+exit $RETVAL
+
This page took 0.031441 seconds and 4 git commands to generate.