load custom configuration paths when agent is disabled

This commit is contained in:
Marco Mariani 2023-01-17 11:09:13 +01:00 committed by mmetc
parent 2e91a82aa7
commit 91b0f8fee1
2 changed files with 5 additions and 5 deletions

View file

@ -206,6 +206,11 @@ func LoadConfig(cConfig *csconfig.Config) error {
dumpStates = true
}
// Configuration paths are dependency to load crowdsec configuration
if err := cConfig.LoadConfigurationPaths(); err != nil {
return err
}
if !flags.DisableAgent {
if err := cConfig.LoadCrowdsec(); err != nil {
return err

View file

@ -40,11 +40,6 @@ type CrowdsecServiceCfg struct {
func (c *Config) LoadCrowdsec() error {
var err error
// Configuration paths are dependency to load crowdsec configuration
if err = c.LoadConfigurationPaths(); err != nil {
return err
}
if err = LoadFeatureFlagsFile(c, log.StandardLogger()); err != nil {
return err
}