mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-03 19:30:54 +00:00 
			
		
		
		
	when updating DNS, clear the local DNS cache
This commit is contained in:
		
							parent
							
								
									93c2258d23
								
							
						
					
					
						commit
						58349a9410
					
				@ -120,6 +120,10 @@ def do_dns_update(env, force=False):
 | 
				
			|||||||
			# If this is the only thing that changed?
 | 
								# If this is the only thing that changed?
 | 
				
			||||||
			updated_domains.append("OpenDKIM configuration")
 | 
								updated_domains.append("OpenDKIM configuration")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						# Clear bind9's DNS cache so our own DNS resolver is up to date.
 | 
				
			||||||
 | 
						# (ignore errors with trap=True)
 | 
				
			||||||
 | 
						shell('check_call', ["/usr/sbin/rndc", "flush"], trap=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(updated_domains) == 0:
 | 
						if len(updated_domains) == 0:
 | 
				
			||||||
		# if nothing was updated (except maybe OpenDKIM's files), don't show any output
 | 
							# if nothing was updated (except maybe OpenDKIM's files), don't show any output
 | 
				
			||||||
		return ""
 | 
							return ""
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user