This commit is contained in:
User1000001
2022-01-08 06:22:03 -08:00
committed by GitHub
5 changed files with 11 additions and 4 deletions
+4 -4
View File
@@ -492,19 +492,19 @@ def write_nsd_zone(domain, zonefile, records, env, force):
zone = """
$ORIGIN {domain}.
$TTL 86400 ; default time to live
$TTL {ttl} ; default time to live
@ IN SOA ns1.{primary_domain}. hostmaster.{primary_domain}. (
__SERIAL__ ; serial number
7200 ; Refresh (secondary nameserver update interval)
86400 ; Retry (when refresh fails, how often to try again)
3600 ; Retry (when refresh fails, how often to try again)
1209600 ; Expire (when refresh fails, how long secondary nameserver will keep records around anyway)
86400 ; Negative TTL (how long negative responses are cached)
{ttl} ; Negative TTL (how long negative responses are cached)
)
"""
# Replace replacement strings.
zone = zone.format(domain=domain, primary_domain=env["PRIMARY_HOSTNAME"])
zone = zone.format(domain=domain, primary_domain=env["PRIMARY_HOSTNAME"], ttl=env["TTL"])
# Add records.
for subdomain, querytype, value, explanation in records: