summaryrefslogtreecommitdiff
path: root/flush
blob: 3a6a3bd5196c69332bbbb97cbb4b197481951a27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

dig @127.0.0.1 ddns.eckner.net AXFR \
| grep '^[^;]' \
| awk '{print $1 " " $4}' \
| grep -vwF 'pool32.ddns.eckner.net.' \
| grep ' A\(AAA\)\?$' \
| sort -u \
| sed '
  s/^\(\S\+\) \(\S\+\)/update delete \1 IN \2/
  1 i zone ddns.eckner.net.
  $ a send
'