Code

control, rules: Enabled the "rrdcached" plugin.
[pkg-collectd.git] / debian / collectd-core.collectd.init.d
index 5e8d29e590394355c44441c245a899ff8f1556d7..d9fc0efaf1f6a8bb0e60ad53fc1000990d9daaa9 100755 (executable)
@@ -49,6 +49,11 @@ if test "$DISABLE" != 0 -a "$1" == "start"; then
        exit 0
 fi
 
+if test ! -e "$CONFIGFILE" -a "$1" == "start"; then
+       echo "Not starting $NAME - no configuration ($CONFIGFILE) found."
+       exit 0
+fi
+
 if test "$ENABLE_COREFILES" == 1; then
        ulimit -c unlimited
 fi
@@ -75,6 +80,12 @@ d_start() {
                return 0
        fi
 
+       if test ! -e "$CONFIGFILE"; then
+               # we get here during restart
+               echo -n " - no configuration ($CONFIGFILE) found."
+               return 0
+       fi
+
        check_config
 
        if test "$USE_COLLECTDMON" == 1; then