X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;fp=brc2;h=45249e6a8f533e812f6a15d394058503c14ad793;hb=ef95a0340c000f1b047928e92bbb82f538726c51;hp=e936badfba828a52dcbab2c003e8b1c05bd2c65a;hpb=7f9af41bd119784d4f062731911d1485d224ec73;p=distro-setup diff --git a/brc2 b/brc2 index e936bad..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,12 +2774,12 @@ 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