openwrtv3/openwrt/package/collectd/files/S80collectd
Florian Fainelli 145ea1eeab Added collectd, thanks to Florian Forster
SVN-Revision: 2796
2005-12-29 15:09:37 +00:00

17 lines
255 B
Bash
Executable file

#!/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