Index: bind.py =================================================================== --- bind.py (Revision 26397) +++ bind.py (Arbeitskopie) @@ -124,18 +124,21 @@ if f.endswith('.proxy'): fp.write('include "%s";\n' % os.path.join(named_conf_dir, f)) fp.close() - univention.debug.debug(univention.debug.LISTENER, univention.debug.INFO, 'DNS: Reloading BIND') restart=False - for file in os.listdir('/var/cache/univention-bind-proxy'): - if not os.path.exists(os.path.join('/var/cache/bind', file)): + for zfile in os.listdir('/var/cache/univention-bind-proxy'): + if not os.path.exists(os.path.join('/var/cache/bind', zfile)): restart=True else: - zone = file.replace(".zone", "") + zone = zfile.replace(".zone", "") if os.path.exists('/usr/sbin/rndc'): + univention.debug.debug(univention.debug.LISTENER, univention.debug.INFO, 'DNS: Reloading BIND') os.spawnv(os.P_WAIT, '/usr/sbin/rndc', ['rndc', '-p 55555', 'reload', zone]) os.spawnv(os.P_WAIT, '/usr/sbin/rndc', ['rndc', '-p 953', 'reload', zone]) - os.remove(os.path.join('/var/cache/univention-bind-proxy', file)) + else: + univention.debug.debug(univention.debug.LISTENER, univention.debug.ERROR, 'DNS: /usr/sbin/rndc missin, install bind9utils!') + os.remove(os.path.join('/var/cache/univention-bind-proxy', zfile)) if restart: + univention.debug.debug(univention.debug.LISTENER, univention.debug.INFO, 'DNS: Restarting BIND') os.spawnv(os.P_WAIT, '/etc/init.d/univention-bind-proxy', ['univention-bind-proxy', 'restart']) os.spawnv(os.P_WAIT, '/etc/init.d/univention-bind', ['univention-bind', 'restart'])