aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/collectd/files/collectd-4.0.4.initd')
-rw-r--r--app-admin/collectd/files/collectd-4.0.4.initd29
1 files changed, 29 insertions, 0 deletions
diff --git a/app-admin/collectd/files/collectd-4.0.4.initd b/app-admin/collectd/files/collectd-4.0.4.initd
new file mode 100644
index 0000000..913269d
--- /dev/null
+++ b/app-admin/collectd/files/collectd-4.0.4.initd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+: ${COLLECTD_PIDFILE:='/var/run/collectd.pid'}
+: ${COLLECTD_CFGFILE:='/etc/collectd.conf'}
+: ${COLLECTD_NICELVL:='5'}
+
+
+depend() {
+ :
+}
+
+start() {
+ ebegin "Starting collectd"
+ start-stop-daemon --start --quiet \
+ --nicelevel "${COLLECTD_NICELVL}" --exec /usr/sbin/collectd -- \
+ -P "${COLLECTD_PIDFILE}" -C "${COLLECTD_CFGFILE}"
+ eend $? "Failed to start collectd"
+}
+
+stop() {
+ ebegin "Stopping collectd"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${COLLECTD_PIDFILE}"
+ eend $? "Failed to stop collectd"
+}
+