X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=dynamic-ip-update.sh;h=336aaf3583e16b42e527832d67ad1e414a45ac24;hb=32fb94de4f6b8e30ee53486f87721e73ed4eff50;hp=923da11464a95fbbbbcdf96493baa88510e38022;hpb=e1413c8bd07f92ec8e1209db83225b56bc39055d;p=distro-setup diff --git a/dynamic-ip-update.sh b/dynamic-ip-update.sh index 923da11..336aaf3 100755 --- a/dynamic-ip-update.sh +++ b/dynamic-ip-update.sh @@ -4,7 +4,7 @@ set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR -cur="$(host -4 iank.pw iankelling.org | sed -rn 's/.*has address (.*)/\1/p;T;q')" +cur="$(host -4 b8.nz iankelling.org | sed -rn 's/.*has address (.*)/\1/p;T;q')" ip=$(curl -s4 https://iankelling.org/cgi/pubip) # note, a simpler way to do this would be to ssh and use @@ -12,28 +12,36 @@ ip=$(curl -s4 https://iankelling.org/cgi/pubip) # to update bind if needed. if [[ $cur != $ip ]]; then - nsupdate -k /p/c/machine_specific/li/filesystem/etc/bind/Kiank.pw.*.private <$f <