diff options
| author | Paul Buetow <paul@buetow.org> | 2024-03-21 20:36:38 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-03-21 20:36:38 +0200 |
| commit | 2603e6fc15a0bb23e46cf7de718d8c956364cbde (patch) | |
| tree | f2b8f0cb3a3b735517feffa9e54d95d29b6f2fe2 | |
| parent | aecc42cd300e186ccab85c4bf8deed1b0dd602d9 (diff) | |
refactor
| -rw-r--r-- | frontends/scripts/dns-failover.ksh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/frontends/scripts/dns-failover.ksh b/frontends/scripts/dns-failover.ksh index c2879f3..0cb0b0b 100644 --- a/frontends/scripts/dns-failover.ksh +++ b/frontends/scripts/dns-failover.ksh @@ -103,7 +103,7 @@ failover_zone () { echo "Reloading nsd" nsd-control reload zone_is_ok $zone - return 2 + return 3 fi for cleanup in invalid bak; do @@ -117,17 +117,16 @@ failover_zone () { } main () { + determine_master_and_standby + local -i ec=0 - if ! determine_master_and_standby; then - ec=1 - fi for zone_file in $ZONES_DIR/*.zone; do if ! failover_zone $zone_file; then ec=1 fi done - # ec other than 0 will tell CRON to send out an email! + # ec other than 0: CRON will send out an E-Mail. exit $ec } |
