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 iank.life 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
# to update bind if needed.
if [[ $cur != $ip ]]; then
- nsupdate -k /p/c/machine_specific/li/filesystem/etc/bind/Kiank.pw.*.private <<EOF
+ nsupdate -k /p/c/machine_specific/li/filesystem/etc/bind/Kiank.life.*.private <<EOF
server iankelling.org
-zone iank.pw
-update delete iank.pw. A
-update add iank.pw. 300 A $ip
-update delete *.iank.pw. A
-update add *.iank.pw. 300 A $ip
+zone iank.life
+update delete iank.life. A
+update add iank.life. 300 A $ip
+update delete *.iank.life. A
+update add *.iank.life. 300 A $ip
show
send
EOF
fi
# persistent initial setup for this:
-# mkc /p/c/machine_specific/li/filesystem/etc/bind
-# s dnssec-keygen -a HMAC-MD5 -b 512 -n HOST iank.pw
-# s chown ian:ian *
-
-# f=key.iank.pw
-# cat >$f <<EOF
-# key iank.pw. {
-# algorithm HMAC-MD5;
-# secret "$(awk '$1 == "Key:" {print $2}' Kiank.pw.*.private)";
-# };
-# EOF
-# chmod 640 $f
+#mkc /p/c/machine_specific/li/filesystem/etc/bind
+#s dnssec-keygen -a HMAC-MD5 -b 512 -n HOST iank.life
+#s chown ian:ian *
+
+f=key.iank.life
+cat >$f <<EOF
+key iank.life. {
+algorithm HMAC-MD5;
+secret "$(awk '$1 == "Key:" {print $2}' Kiank.life.*.private)";
+};
+EOF
+
+chmod 640 $f