Stop requiring current working directory to be the location of AdGuardHome.
Fixes #381.
This commit is contained in:
@@ -195,8 +195,10 @@ func generateCoreDNSConfigText() (string, error) {
|
||||
}
|
||||
|
||||
var configBytes bytes.Buffer
|
||||
temporaryConfig := config.CoreDNS
|
||||
temporaryConfig.FilterFile = filepath.Join(config.ourBinaryDir, config.CoreDNS.FilterFile)
|
||||
// run the template
|
||||
err = t.Execute(&configBytes, config.CoreDNS)
|
||||
err = t.Execute(&configBytes, &temporaryConfig)
|
||||
if err != nil {
|
||||
log.Printf("Couldn't generate DNS config: %s", err)
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user