X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/c3862dc0f135a52327fbf9511c22392555e84f3f..91cc87ccd8910e4bbeecf2981d6c07b8578b28c0:/pymin/services/dns/__init__.py?ds=inline diff --git a/pymin/services/dns/__init__.py b/pymin/services/dns/__init__.py index 7d09c2f..9324afb 100644 --- a/pymin/services/dns/__init__.py +++ b/pymin/services/dns/__init__.py @@ -162,6 +162,18 @@ class DnsHandler(Restorable, ConfigWriter, InitdHandler, TransactionalHandler, return False # Do reload return True # we don't need to reload + # HACK!!!! + def handle_timer(self): + import subprocess + p = subprocess.Popen(('pgrep', '-f', '/usr/sbin/named'), + stdout=subprocess.PIPE) + pid = p.communicate()[0] + if p.returncode == 0 and len(pid) > 0: + self._service_running = True + else: + self._service_running = False + + if __name__ == '__main__':