Code

patches/00list: Removed ipvs_h_include.dpatch.
[pkg-collectd.git] / debian / collectd-core.collectd.init.d
index 5e8d29e590394355c44441c245a899ff8f1556d7..70b1a8f5bf9cc6346d39d8c4654f37aa5cf690da 100755 (executable)
 # Should-Stop:       $network $named $syslog
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
-# Short-Description: start the statistics collection daemon
+# Short-Description: manage the statistics collection daemon
+# Description:       collectd is the statistics collection daemon.
+#                    It is a small daemon which collects system information
+#                    periodically and provides mechanisms to monitor and store
+#                    the values in a variety of ways.
 ### END INIT INFO
 
 set -e
@@ -49,6 +53,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 +84,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