support yml file (#1605)
This commit is contained in:
parent
628d7be1d8
commit
a4f4eabf0a
|
@ -153,7 +153,7 @@ func LoadBuckets(cscfg *csconfig.CrowdsecServiceCfg, files []string, tomb *tomb.
|
||||||
response = make(chan types.Event, 1)
|
response = make(chan types.Event, 1)
|
||||||
for _, f := range files {
|
for _, f := range files {
|
||||||
log.Debugf("Loading '%s'", f)
|
log.Debugf("Loading '%s'", f)
|
||||||
if !strings.HasSuffix(f, ".yaml") {
|
if !strings.HasSuffix(f, ".yaml") && !strings.HasSuffix(f, ".yml") {
|
||||||
log.Debugf("Skipping %s : not a yaml file", f)
|
log.Debugf("Skipping %s : not a yaml file", f)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ func LoadStages(stageFiles []Stagefile, pctx *UnixParserCtx, ectx EnricherCtx) (
|
||||||
pctx.Stages = []string{}
|
pctx.Stages = []string{}
|
||||||
|
|
||||||
for _, stageFile := range stageFiles {
|
for _, stageFile := range stageFiles {
|
||||||
if !strings.HasSuffix(stageFile.Filename, ".yaml") {
|
if !strings.HasSuffix(stageFile.Filename, ".yaml") && !strings.HasSuffix(stageFile.Filename, ".yml") {
|
||||||
log.Warningf("skip non yaml : %s", stageFile.Filename)
|
log.Warningf("skip non yaml : %s", stageFile.Filename)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue