From ed1ee897100c57f389499656cd9114fc936796a2 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 29 Dec 2005 15:09:37 +0000 Subject: Added collectd, thanks to Florian Forster git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2796 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- openwrt/package/collectd/files/S80collectd | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 openwrt/package/collectd/files/S80collectd (limited to 'openwrt/package/collectd/files/S80collectd') diff --git a/openwrt/package/collectd/files/S80collectd b/openwrt/package/collectd/files/S80collectd new file mode 100755 index 000000000..aa767fbc4 --- /dev/null +++ b/openwrt/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 -- cgit v1.2.3