summaryrefslogtreecommitdiffstats
path: root/package/collectd/files
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-12-29 15:09:37 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-12-29 15:09:37 +0000
commit00dd3f5de8dc45114351cf731152904a327d96d4 (patch)
tree861f66273c9f431367e6ef5750990e54f3bf2e25 /package/collectd/files
parent696ff36854d805fe63f8cd661f24bddf6edb144c (diff)
Added collectd, thanks to Florian Forster
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2796 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/collectd/files')
-rwxr-xr-xpackage/collectd/files/S80collectd17
1 files changed, 17 insertions, 0 deletions
diff --git a/package/collectd/files/S80collectd b/package/collectd/files/S80collectd
new file mode 100755
index 000000000..aa767fbc4
--- /dev/null
+++ b/package/collectd/files/S80collectd
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+BINARY="/usr/sbin/collectd"
+PIDFILE="/var/run/collectd.pid"
+DATADIR="/var/lib/collectd"
+
+[ -x "$BINARY" ] || exit 1;
+
+if [ -e "$PIDFILE" ]
+then
+ kill $(cat "$PIDFILE") 2>/dev/null
+ sleep 1
+fi
+
+[ -d "$DATADIR" ] || mkdir -p "$DATADIR";
+
+$BINARY