From 555256f2507895027f541a52b39b980381232eed Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 18 Mar 2024 10:47:20 +0200 Subject: add tmpedit --- frontends/scripts/dnsfailover.sh.tpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'frontends/scripts') diff --git a/frontends/scripts/dnsfailover.sh.tpl b/frontends/scripts/dnsfailover.sh.tpl index 86fa4e8..a92201b 100644 --- a/frontends/scripts/dnsfailover.sh.tpl +++ b/frontends/scripts/dnsfailover.sh.tpl @@ -6,7 +6,7 @@ MASTER_AAAA=master_aaaa STANDBY_A=standby_a STANDBY_AAAA=standby_aaaa -process_zone () { +transform_zone () { sed -E ' /IN A .*; Enable failover/ { /^mirror/! { @@ -32,7 +32,10 @@ process_zone () { failover_zone () { zone=$1 - cat $zone | process_zone + cat $zone | transform_zone > $zone.new && \ + mv $zone $zone.bak && \ + mv $zone.new $zone + nsd-checkconf checkzone $zone } for zone in $ZONES_DIR/snonux.foo.zone; do -- cgit v1.2.3