From 2cc808333fd005b00542c29ece16a7e2a1d033ff Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 18 Apr 2018 04:51:12 +0200 Subject: [PATCH] [fix] do not exit on success bind reload --- dynette.cron.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dynette.cron.py b/dynette.cron.py index 21dda87..8205f98 100755 --- a/dynette.cron.py +++ b/dynette.cron.py @@ -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')