mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 09:25:41 +08:00
conf: support relative path of rulefile in systemd service. #52
This commit is contained in:
parent
0170fd7c98
commit
140ed9d8eb
3
conf.go
3
conf.go
@ -75,6 +75,9 @@ func confInit() {
|
|||||||
|
|
||||||
// rulefiles
|
// rulefiles
|
||||||
for _, ruleFile := range conf.RuleFile {
|
for _, ruleFile := range conf.RuleFile {
|
||||||
|
if !path.IsAbs(ruleFile) {
|
||||||
|
ruleFile = path.Join(flag.ConfDir(), ruleFile)
|
||||||
|
}
|
||||||
rule, err := rule.NewConfFromFile(ruleFile)
|
rule, err := rule.NewConfFromFile(ruleFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user