mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-10-30 18:50:53 +00:00 
			
		
		
		
	Merge pull request #282 from m4rcs/master
Fix NS status check - should sort on both ends of the comparison
This commit is contained in:
		
						commit
						3bc5361491
					
				| @ -207,10 +207,10 @@ def check_dns_zone(domain, env, dns_zonefiles): | |||||||
| 	# to do a DNS trace. | 	# to do a DNS trace. | ||||||
| 	custom_dns = get_custom_dns_config(env) | 	custom_dns = get_custom_dns_config(env) | ||||||
| 	existing_ns = query_dns(domain, "NS") | 	existing_ns = query_dns(domain, "NS") | ||||||
| 	correct_ns = "; ".join([ | 	correct_ns = "; ".join(sorted([ | ||||||
| 		"ns1." + env['PRIMARY_HOSTNAME'], | 		"ns1." + env['PRIMARY_HOSTNAME'], | ||||||
| 		custom_dns.get("_secondary_nameserver", "ns2." + env['PRIMARY_HOSTNAME']), | 		custom_dns.get("_secondary_nameserver", "ns2." + env['PRIMARY_HOSTNAME']), | ||||||
| 		]) | 		])) | ||||||
| 	if existing_ns.lower() == correct_ns.lower(): | 	if existing_ns.lower() == correct_ns.lower(): | ||||||
| 		env['out'].print_ok("Nameservers are set correctly at registrar. [%s]" % correct_ns) | 		env['out'].print_ok("Nameservers are set correctly at registrar. [%s]" % correct_ns) | ||||||
| 	else: | 	else: | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user