diff --git a/conf.go b/conf.go index 7466ea0..85b1063 100644 --- a/conf.go +++ b/conf.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "os" + "path" "github.com/nadoo/conflag" ) @@ -66,8 +67,9 @@ func confInit() { conf.rules = append(conf.rules, rule) } - // TODO: allow to use relative dir to the config file + conf.RulesDir = path.Join(flag.ConfDir(), conf.RulesDir) ruleFolderFiles, _ := listDir(conf.RulesDir, ".rule") + for _, ruleFile := range ruleFolderFiles { rule, err := NewRuleConfFromFile(ruleFile) if err != nil {