conf: support relative path of rulefile in systemd service. #52

This commit is contained in:
nadoo committed 2018-08-30 07:36:46 +08:00
1 parent 0170fd7c98
commit 140ed9d8eb
1 file changed
+3
+3
View File
@@ -75,6 +75,9 @@ func confInit() {
// rulefiles
for _, ruleFile := range conf.RuleFile {
if !path.IsAbs(ruleFile) {
ruleFile = path.Join(flag.ConfDir(), ruleFile)
}
rule, err := rule.NewConfFromFile(ruleFile)
if err != nil {
log.Fatal(err)