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 | |
parent | f53bd60a7a3cd1d1f3948735a0172ce5dd3b3184 (diff) |
update dns script
-rw-r--r-- | config/router.nix | 2 | ||||
-rwxr-xr-x | tools/update-dns.sh | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/config/router.nix b/config/router.nix index 9b9f49b..a0dc160 100644 --- a/config/router.nix +++ b/config/router.nix @@ -23,7 +23,7 @@ in { }) [ 10 30 100 255 ]); networking.bonds.bond0 = { - interfaces = [ "eno1" ]; + interfaces = [ "eno1" "eno2" ]; driverOptions = { miimon = "1000"; mode = "balance-rr"; 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 |