diff --git a/cmd/crowdsec/main.go b/cmd/crowdsec/main.go index 3692ff692..2f6b01ebd 100644 --- a/cmd/crowdsec/main.go +++ b/cmd/crowdsec/main.go @@ -14,6 +14,7 @@ import ( "github.com/crowdsecurity/crowdsec/pkg/outputs" "github.com/crowdsecurity/crowdsec/pkg/parser" "github.com/crowdsecurity/crowdsec/pkg/types" + "github.com/pkg/errors" "github.com/sevlyar/go-daemon" log "github.com/sirupsen/logrus" @@ -163,6 +164,10 @@ func LoadOutputs(cConfig *csconfig.CrowdSec) error { return fmt.Errorf("output plugins initialization error : %s", err.Error()) } + if err := OutputRunner.StartAutoCommit(); err != nil { + return errors.Wrap(err, "failed to start autocommit") + } + /* Init the API connector */ if cConfig.APIMode { log.Infof("Loading API client")