X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=45249e6a8f533e812f6a15d394058503c14ad793;hb=ef95a0340c000f1b047928e92bbb82f538726c51;hp=33384bcdd0a962c90a19242bbcfabf1aa3e4a4c3;hpb=3e5e60efe20de2e109ad48745a5dcee04d7417a1;p=distro-setup diff --git a/brc2 b/brc2 index 33384bc..45249e6 100644 --- a/brc2 +++ b/brc2 @@ -2749,7 +2749,13 @@ EOF echo "EOF" } | u /p/c/dnsmasq-data + b8_ip=$(dig +short b8.nz @iankelling.org | tail -1) + if [[ ! $b8_ip ]]; then + echo "$0: error: got empty b8.nz ip. returning 1" + return 1 + fi { + echo "@ A $b8_ip" for host in ${!nonvpn_ips[@]}; do ipsuf=${nonvpn_ips[$host]} echo "$host A 10.2.0.$ipsuf" @@ -2768,16 +2774,16 @@ EOF echo checking for stray files: - initial_dir=$PWD + initial_dir="$PWD" cd /a/bin/ds/machine_specific ngset files=( */filesystem/etc/systemd/system/openvpn-client-tr@.service ) ngreset - cd $initial_dir + cd "$initial_dir" for f in "${files[@]}"; do host=${f%%/*} if [[ ! ${vpn_ips[$host]} ]]; then - e /a/bin/ds/machine_specific/$host/filesystem/etc/systemd/system/openvpn-client-tr@.service + e rm /a/bin/ds/machine_specific/$host/filesystem/etc/systemd/system/openvpn-client-tr@.service fi done @@ -4480,7 +4486,7 @@ hssh-update() { case $HOSTNAME in sy|kd) hosts=( - kd x3.office.fsf.org syw + kd.b8.nz x3.office.fsf.org syw x2.b8.nz ) ;; x3)