summaryrefslogtreecommitdiff
path: root/frontends/scripts
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-03-18 10:47:20 +0200
committerPaul Buetow <paul@buetow.org>2024-03-18 10:47:20 +0200
commit555256f2507895027f541a52b39b980381232eed (patch)
treee6cb9a00eb715b069a4ae7825f7304c5763f68db /frontends/scripts
parentf60d5a3ef03b2bb9526c1d27d57e60e673cd95d8 (diff)
add tmpedit
Diffstat (limited to 'frontends/scripts')
-rw-r--r--frontends/scripts/dnsfailover.sh.tpl7
1 files changed, 5 insertions, 2 deletions
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