From b75fbf22cac49ea83c3500c8a379631bdcff6730 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Thu, 23 Oct 2014 17:06:33 +0000 Subject: [PATCH] clear the local dns cache each time the status checks are run by restarting bind9 --- management/status_checks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/management/status_checks.py b/management/status_checks.py index 3d71ccf9..8787b5b2 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -18,6 +18,10 @@ from mailconfig import get_mail_domains, get_mail_aliases from utils import shell, sort_domains, load_env_vars_from_file def run_checks(env, output): + # clear the DNS cache so our DNS checks are most up to date + shell('check_call', ["/usr/sbin/service", "bind9", "restart"]) + + # perform checks env["out"] = output run_system_checks(env) run_network_checks(env)