diff options
Diffstat (limited to 'package/collectd/files')
-rwxr-xr-x | package/collectd/files/S80collectd | 17 |
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 |