[fix] do not exit on success bind reload

This commit is contained in:
Laurent Peuch 2018-04-18 04:51:12 +02:00
parent e2120ed8f0
commit 2cc808333f

View file

@ -144,9 +144,7 @@ with psycopg2.connect(postgresql_dsn) as postgresql_connection:
os.system('chown -R bind:bind '+ zone_dir +' '+ conf_file)
# Reload Bind
if os.system('/usr/sbin/rndc reload') == 0:
sys.exit(0)
else:
if os.system('/usr/sbin/rndc reload') != 0:
os.system('cp '+ conf_file +' '+ conf_file +'.bad')
os.system('cp '+ conf_file +'.back '+ conf_file)
os.system('/usr/sbin/rndc reload')