Add freebsd case for root config location

This commit is contained in:
eleksir
2024-10-01 01:18:28 +03:00
parent 7474028b82
commit 0b573aa169

View File

@@ -33,9 +33,13 @@ func readConf() (Config, error) {
}
cnf, err = readConfFile(os.Getenv("HOME") + "/.reniced.yaml")
} else {
if runtime.GOOS == "freebsd" {
cnf, err = readConfFile("/usr/local/etc/reniced.yaml")
} else {
cnf, err = readConfFile("/etc/reniced.yaml")
}
}
return cnf, err
}