|
|
@ -146,12 +146,12 @@ def adaptZoneName(zone):
|
|
|
|
return zone
|
|
|
|
return zone
|
|
|
|
|
|
|
|
|
|
|
|
def dumpZoneData(zone, dumpFile):
|
|
|
|
def dumpZoneData(zone, dumpFile):
|
|
|
|
log.debug(f'{zone} |\tDumping..')
|
|
|
|
log.debug(f"{zone} |\tDumping to '{dumpFile}'..")
|
|
|
|
return os.system(f"dnscontrol get-zones --format=js --out={dumpFile} powerdns POWERDNS {zone}")
|
|
|
|
return os.system(f"dnscontrol get-zones --format=js --out={dumpFile} powerdns POWERDNS {zone}")
|
|
|
|
|
|
|
|
|
|
|
|
ignoreLinesRexp = r"^\s*(var|D\(|DnsProvider\(|DefaultTTL\()"
|
|
|
|
ignoreLinesRexp = r"^\s*(var|D\(|DnsProvider\(|DefaultTTL\()"
|
|
|
|
def adaptFileForRequire(zone, dumpFile):
|
|
|
|
def adaptFileForRequire(zone, dumpFile):
|
|
|
|
log.debug(f'{zone} |\tRewriting file..')
|
|
|
|
log.debug(f"{zone} |\tRewriting file '{dumpFile}'..")
|
|
|
|
|
|
|
|
|
|
|
|
with open(dumpFile, 'r') as fin:
|
|
|
|
with open(dumpFile, 'r') as fin:
|
|
|
|
with open(f"{dumpFile}.tmp", 'r') as fout:
|
|
|
|
with open(f"{dumpFile}.tmp", 'r') as fout:
|
|
|
|