Moved static records to more intuitive place

This commit is contained in:
Joona Hoikkala 2016-11-15 09:27:34 +02:00
parent acf59bb0d4
commit 9b452f69ff
No known key found for this signature in database
GPG Key ID: C14AAE0F5ADCB854
3 changed files with 18 additions and 17 deletions

View File

@ -5,18 +5,6 @@ domain = "auth.example.org"
nsname = "ns1.auth.example.org" nsname = "ns1.auth.example.org"
# admin email address, with @ substituted with . # admin email address, with @ substituted with .
nsadmin = "admin.example.org" nsadmin = "admin.example.org"
[api]
# domain name to listen requests for, mandatory if using tls = "letsencrypt"
# use "" (empty string) to bind to all interfaces
api_domain = ""
# listen port, eg. 443 for default HTTPS
port = "8080"
# possible values: "letsencrypt", "cert", "false"
tls = "letsencrypt"
# only used if tls = "cert"
tls_cert_privkey = "/etc/tls/example.org/privkey.pem"
tls_cert_fullchain = "/etc/tls/example.org/fullchain.pem"
# predefined records that we're serving in addition to the TXT # predefined records that we're serving in addition to the TXT
records = [ records = [
# default A # default A
@ -29,6 +17,19 @@ records = [
"auth.example.org. NS ns2.auth.example.org.", "auth.example.org. NS ns2.auth.example.org.",
] ]
[api]
# domain name to listen requests for, mandatory if using tls = "letsencrypt"
# use "" (empty string) to bind to all interfaces
api_domain = ""
# listen port, eg. 443 for default HTTPS
port = "8080"
# possible values: "letsencrypt", "cert", "false"
tls = "letsencrypt"
# only used if tls = "cert"
tls_cert_privkey = "/etc/tls/example.org/privkey.pem"
tls_cert_fullchain = "/etc/tls/example.org/fullchain.pem"
[logconfig] [logconfig]
# logging level # logging level
loglevel = "debug" loglevel = "debug"

View File

@ -58,7 +58,7 @@ func main() {
logging.SetBackend(logFormatter) logging.SetBackend(logFormatter)
// Read the default records in // Read the default records in
RR.Parse(DnsConf.Api.StaticRecords) RR.Parse(DnsConf.General.StaticRecords)
// Open database // Open database
err = DB.Init("acme-dns.db") err = DB.Init("acme-dns.db")

View File

@ -26,6 +26,7 @@ type general struct {
Domain string Domain string
Nsname string Nsname string
Nsadmin string Nsadmin string
StaticRecords []string `toml:"records"`
} }
// API config // API config
@ -35,7 +36,6 @@ type httpapi struct {
Tls string Tls string
Tls_cert_privkey string Tls_cert_privkey string
Tls_cert_fullchain string Tls_cert_fullchain string
StaticRecords []string `toml:"records"`
} }
// Logging config // Logging config