Adds configuration from config file.
This commit is contained in:
@ -16,11 +16,11 @@ func buildBindResponsePolicyFile() {
|
||||
outputTemplate := `{{- $domain := .Domain -}}
|
||||
$TTL {{ or .TTL "1h" }}
|
||||
@ IN SOA {{ $domain }}. {{ or .Email "domain-admin" }}. (
|
||||
{{ or .Timestamp "0000000000" }} ; Serial
|
||||
{{ or .Refresh "1h" }} ; Refresh
|
||||
{{ or .Retry "30m" }} ; Retry
|
||||
{{ or .Expire "1w" }} ; Expire
|
||||
{{ or .Minimum "1h" }} ; Minimum
|
||||
{{ or .Serial "0000000000" }} ; Serial
|
||||
{{ or .Refresh "1h" }} ; Refresh
|
||||
{{ or .Retry "30m" }} ; Retry
|
||||
{{ or .Expire "1w" }} ; Expire
|
||||
{{ or .Minimum "1h" }} ; Minimum
|
||||
)
|
||||
|
||||
;
|
||||
@ -33,7 +33,7 @@ $TTL {{ or .TTL "1h" }}
|
||||
;
|
||||
; Addresses
|
||||
;
|
||||
{{- range .BadDomains }}
|
||||
{{- range .BlockedDomains }}
|
||||
{{ . }} IN CNAME blocked.{{ $domain }}.
|
||||
{{- end }}`
|
||||
|
||||
@ -42,7 +42,7 @@ $TTL {{ or .TTL "1h" }}
|
||||
log.Fatalf("[FATAL] Unable to parse template (%s): %v\n", "response-policy-zone", err)
|
||||
}
|
||||
|
||||
if err := t.Execute(&output, config.NamedConfig); err != nil {
|
||||
if err := t.Execute(&output, config.Config.ZoneConfig); err != nil {
|
||||
log.Fatalf("[FATAL] Unable to generate template output: %v\n", err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user