diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2021-07-19 23:27:28 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2021-07-19 23:27:28 -0400 |
commit | 973d2fcd3130c990e1aa89547134f5799c17db2c (patch) | |
tree | 9934f32b8d3fb2564c92e876409a43990712de7e /tools/update-dns.sh | |
parent | f53bd60a7a3cd1d1f3948735a0172ce5dd3b3184 (diff) |
update dns script
Diffstat (limited to 'tools/update-dns.sh')
-rwxr-xr-x | tools/update-dns.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/update-dns.sh b/tools/update-dns.sh index 97fbb50..fa3f4e5 100755 --- a/tools/update-dns.sh +++ b/tools/update-dns.sh @@ -1,4 +1,5 @@ keyfile=/opt/secret/bind/dynamic.orbekk.com/update/named.conf.key +INTERFACE=bond0.10 update() { local type="$1" @@ -17,11 +18,11 @@ update() { } | nsupdate -v -k "$keyfile" } -ip_4="$(ip -br -4 addr list dev eno1 | awk -F' *|/' '{print $3}')" +ip_4="$(ip -br -4 addr list dev ${INTERFACE} | awk -F' *|/' '{print $3}')" if [[ -n "$ip_4" ]]; then update A $(hostname).dynamic.orbekk.com $ip_4 fi -ip_6="$(ip -br -6 addr list scope global dev eno1 | awk -F' *|/' '{print $3}')" +ip_6="$(ip -br -6 addr list scope global dev ${INTERFACE} | awk -F' *|/' '{print $3}')" if [[ -n "$ip_6" ]]; then update AAAA $(hostname).dynamic.orbekk.com $ip_6 fi |