From a1851a413bc14316068bf059e66635008ce5083b Mon Sep 17 00:00:00 2001 From: KiekerJan Date: Mon, 18 Apr 2022 21:52:33 +0200 Subject: [PATCH] use actual unbound command to flush cache --- management/dns_update.py | 2 +- management/status_checks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/management/dns_update.py b/management/dns_update.py index d934f50b..ef20d767 100755 --- a/management/dns_update.py +++ b/management/dns_update.py @@ -118,7 +118,7 @@ def do_dns_update(env, force=False): # Clear unbound's DNS cache so our own DNS resolver is up to date. # (ignore errors with trap=True) - shell('check_call', ["/usr/sbin/unbound-control", "reload"], trap=True, capture_stdout=False) + shell('check_call', ["/usr/sbin/unbound-control", "flush_zone", "."], trap=True, capture_stdout=False) if len(updated_domains) == 0: # if nothing was updated (except maybe DKIM's files), don't show any output diff --git a/management/status_checks.py b/management/status_checks.py index 94b2ca4a..3a20c05c 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -57,7 +57,7 @@ def run_checks(rounded_values, env, output, pool, domains_to_check=None): # clear unbound's DNS cache so our DNS checks are up to date # (ignore errors; if unbound isn't running we'd already report # that in run_services checks.) - shell('check_call', ["/usr/sbin/unbound-control", "reload"], trap=True, capture_stdout=False) + shell('check_call', ["/usr/sbin/unbound-control", "flush_zone", "."], trap=True, capture_stdout=False) run_system_checks(rounded_values, env, output)