Moved static records to more intuitive place
This commit is contained in:
parent
acf59bb0d4
commit
9b452f69ff
25
config.cfg
25
config.cfg
@ -5,18 +5,6 @@ domain = "auth.example.org"
|
||||
nsname = "ns1.auth.example.org"
|
||||
# admin email address, with @ substituted with .
|
||||
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
|
||||
records = [
|
||||
# default A
|
||||
@ -29,6 +17,19 @@ records = [
|
||||
"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]
|
||||
# logging level
|
||||
loglevel = "debug"
|
||||
|
||||
2
main.go
2
main.go
@ -58,7 +58,7 @@ func main() {
|
||||
logging.SetBackend(logFormatter)
|
||||
|
||||
// Read the default records in
|
||||
RR.Parse(DnsConf.Api.StaticRecords)
|
||||
RR.Parse(DnsConf.General.StaticRecords)
|
||||
|
||||
// Open database
|
||||
err = DB.Init("acme-dns.db")
|
||||
|
||||
2
types.go
2
types.go
@ -26,6 +26,7 @@ type general struct {
|
||||
Domain string
|
||||
Nsname string
|
||||
Nsadmin string
|
||||
StaticRecords []string `toml:"records"`
|
||||
}
|
||||
|
||||
// API config
|
||||
@ -35,7 +36,6 @@ type httpapi struct {
|
||||
Tls string
|
||||
Tls_cert_privkey string
|
||||
Tls_cert_fullchain string
|
||||
StaticRecords []string `toml:"records"`
|
||||
}
|
||||
|
||||
// Logging config
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user