Commit 3645353c authored by Maxime Bombar's avatar Maxime Bombar
Browse files

début d'une transition vers bind

parent ad9c1856
......@@ -167,7 +167,7 @@ def write_dns_file(zone, verbose=False):
txt_records = "\n".join(
template_txt.format(
field1=x['field1'],
field2=x['field2']
field2=x['field2'].replace("\r", "")
)
for x in zone['txt_records']
)
......@@ -221,10 +221,11 @@ def write_dns_file(zone, verbose=False):
)
if zone['name'][1:] == "crans.org":
ds_records = ""
for extension in filter(lambda zone: zone.endswith('.crans.org'), zone_names):
for ds in knot.get_ds(extension, verbose):
ds_records += template_ds.format(**ds) + "\n"
# ds_records = ""
# for extension in filter(lambda zone: zone.endswith('.crans.org'), zone_names):
# for ds in knot.get_ds(extension, verbose):
# ds_records += template_ds.format(**ds) + "\n"
ds_records = "\n"
else:
ds_records = "\n"
......@@ -456,7 +457,7 @@ if __name__ == '__main__':
json.dump(serial + 1, serial_json)
if not args.no_reload:
error = os.system('/usr/sbin/knotc zone-reload >/dev/null 2>&1')
error = os.system('/usr/sbin/rndc reload >/dev/null 2>&1')
if error:
# reload again and display the error message
os.system('/usr/sbin/knotc zone-reload')
os.system('/usr/sbin/rndc reload')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment