1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

Use nsd-control to refresh nsd after zone files are rewritten rather than 'service nsd restart'

I am not sure if this was the problem but nsd didn't serve updated zonefiles on my box and 'service nsd restart' must have been used, so maybe it doesn't reload zones.
This commit is contained in:
Joshua Tauberer 2022-10-02 21:20:21 -04:00
parent 9b111e2493
commit 0a970f4bb2

View File

@ -96,9 +96,9 @@ def do_dns_update(env, force=False):
if len(updated_domains) == 0: if len(updated_domains) == 0:
updated_domains.append("DNS configuration") updated_domains.append("DNS configuration")
# Kick nsd if anything changed. # Tell nsd to reload changed zone files.
if len(updated_domains) > 0: if len(updated_domains) > 0:
shell('check_call', ["/usr/sbin/service", "nsd", "restart"]) shell('check_call', ["/usr/sbin/nsd-control", "reload"])
# Write the OpenDKIM configuration tables for all of the mail domains. # Write the OpenDKIM configuration tables for all of the mail domains.
from mailconfig import get_mail_domains from mailconfig import get_mail_domains