diff --git a/dyndomain b/dyndomain index 2bf87fb..b23e748 100755 --- a/dyndomain +++ b/dyndomain @@ -103,7 +103,8 @@ def read_zone_list_from_file(zone_filename): config.read(zone_filename) for host in config: for p in config[host]: - zone_list.append([host, p.upper(), config[host][p]]) + for target in config[host][p].split('\n'): + zone_list.append([host, p.upper(), target]) return zone_list @@ -124,7 +125,10 @@ def write_zone_list_to_file(zone_filename, zone_list): for host,typefield,target in zone_list: if not host in config: config[host] = {} - config[host][typefield] = target + if typefield in config[host]: + config[host][typefield] += '\n'+target + else: + config[host][typefield] = target with open(zone_filename, 'w') as configfile: config.write(configfile)