load custom configuration paths when agent is disabled
This commit is contained in:
parent
2e91a82aa7
commit
91b0f8fee1
|
@ -206,6 +206,11 @@ func LoadConfig(cConfig *csconfig.Config) error {
|
||||||
dumpStates = true
|
dumpStates = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Configuration paths are dependency to load crowdsec configuration
|
||||||
|
if err := cConfig.LoadConfigurationPaths(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if !flags.DisableAgent {
|
if !flags.DisableAgent {
|
||||||
if err := cConfig.LoadCrowdsec(); err != nil {
|
if err := cConfig.LoadCrowdsec(); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -40,11 +40,6 @@ type CrowdsecServiceCfg struct {
|
||||||
func (c *Config) LoadCrowdsec() error {
|
func (c *Config) LoadCrowdsec() error {
|
||||||
var err 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 {
|
if err = LoadFeatureFlagsFile(c, log.StandardLogger()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue