X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=debian%2Fcollectd.init.d;h=13118fabf4136d4de344a4b222aa3284727b2a32;hb=4516a47b848b3753e07d35e8c5eeb5c39fc88d4a;hp=200647154382496348a6ba11b191d08e90452748;hpb=257828f628523077c73c858744e1e93f0231304a;p=collectd.git diff --git a/debian/collectd.init.d b/debian/collectd.init.d index 20064715..13118fab 100755 --- a/debian/collectd.init.d +++ b/debian/collectd.init.d @@ -13,6 +13,7 @@ NAME=collectd DAEMON=/usr/sbin/$NAME SCRIPTNAME=/etc/init.d/$NAME ARGS="" +CONFIG=/etc/collectd.conf # Gracefully exit if the package has been removed. test -x $DAEMON || exit 0 @@ -22,32 +23,13 @@ then . /etc/default/$NAME fi -if [ -n "$DATA_DIR" ]; then - ARGS="-D $DATA_DIR" -fi - -if [ -n "$PING_HOST" ]; then - for HOST in $PING_HOST - do - ARGS="$ARGS -p $HOST" - done -fi - # # Function that starts the daemon/service. # d_start() { - if [ "x$START_SERVER" = "xyes" ] - then - $DAEMON -s $ARGS - fi - if [ "x$START_CLIENT" = "xyes" ] - then - $DAEMON -c $ARGS - fi - if [ "x$START_SERVER" != "xyes" -a "x$START_CLIENT" != "xyes" ] + if [ -e "$CONFIG" ] then - start-stop-daemon --start --quiet --exec $DAEMON -- -l $ARGS + start-stop-daemon --start --quiet --exec $DAEMON -- -C "$CONFIG" fi }