3 # collectd Initscript for collectd
4 # http://verplant.org/collectd/
5 # Author: Florian Forster <octo@verplant.org>
10 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
11 DESC="Statistics collection daemon"
13 DAEMON=/usr/sbin/$NAME
14 SCRIPTNAME=/etc/init.d/$NAME
17 # Gracefully exit if the package has been removed.
18 test -x $DAEMON || exit 0
20 if [ -r /etc/default/$NAME ]
25 if [ -n "$DATA_DIR" ]; then
29 if [ -n "$PING_HOST" ]; then
30 for HOST in $PING_HOST
37 # Function that starts the daemon/service.
40 if [ "x$START_SERVER" = "xyes" ]
44 if [ "x$START_CLIENT" = "xyes" ]
48 if [ "x$START_SERVER" != "xyes" -a "x$START_CLIENT" != "xyes" ]
50 start-stop-daemon --start --quiet --exec $DAEMON -- -l $ARGS
55 # Function that stops the daemon/service.
58 start-stop-daemon --stop --quiet --exec $DAEMON
63 echo -n "Starting $DESC: $NAME"
68 echo -n "Stopping $DESC: $NAME"
73 echo -n "Restarting $DESC: $NAME"
80 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2