1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-22 18:47:23 +01:00

merge upstream 60.1

This commit is contained in:
KiekerJan
2022-10-30 23:01:19 +01:00
parent 30b994f2b4
commit ebc5f06d61
4 changed files with 18 additions and 3 deletions

View File

@@ -104,7 +104,16 @@ def do_dns_update(env, force=False):
# Tell nsd to reload changed zone files.
if len(updated_domains) > 0:
shell('check_call', ["/usr/sbin/nsd-control", "reload"])
# 'reconfig' is needed if there are added or removed zones, but
# it may not reload existing zones, so we call 'reload' too. If
# nsd isn't running, nsd-control fails, so in that case revert
# to restarting nsd to make sure it is running. Restarting nsd
# should also refresh everything.
try:
shell('check_call', ["/usr/sbin/nsd-control", "reconfig"])
shell('check_call', ["/usr/sbin/nsd-control", "reload"])
except:
shell('check_call', ["/usr/sbin/service", "nsd", "restart"])
# Write the DKIM configuration tables for all of the mail domains.
from mailconfig import get_mail_domains