aboutsummaryrefslogtreecommitdiffstats
path: root/package/collectd/files
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2005-12-29 15:09:37 +0000
committerFlorian Fainelli <florian@openwrt.org>2005-12-29 15:09:37 +0000
commit88965014cb771fc06270f54e6e444fdf82414984 (patch)
tree861f66273c9f431367e6ef5750990e54f3bf2e25 /package/collectd/files
parentc85fd1e54990f6c869e1ed9b2712162a94dc7483 (diff)
downloadupstream-88965014cb771fc06270f54e6e444fdf82414984.tar.gz
upstream-88965014cb771fc06270f54e6e444fdf82414984.tar.bz2
upstream-88965014cb771fc06270f54e6e444fdf82414984.zip
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 0000000000..aa767fbc48
--- /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