lots of updates
[distro-setup] / dynamic-ip-update.sh
index 42dab1f2e67b93055daaa37fc3e83589973adfe8..e49ff3145e57878eb5e8a917f2447ceb62d2e2ab 100755 (executable)
@@ -22,19 +22,36 @@ 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.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)";
-};
+    nsupdate -k /p/c/machine_specific/li/filesystem/etc/bind/Kb8.nz.*.private <<EOF
+server iankelling.org
+zone b8.nz
+update delete b8.nz. A
+update add b8.nz. 300 A $ip
+update delete *.b8.nz. A
+update add *.b8.nz. 300 A $ip
+show
+send
 EOF
+fi
+
+# # persistent initial setup for this:
+# # create files in /a/c/machine_specific/li/filesystem/etc/bind
+
+# mkc /p/c/machine_specific/li/filesystem/etc/bind
+# s dnssec-keygen -a HMAC-MD5 -b 512 -n HOST b8.nz
+# s chown ian:ian *
+
+# f=key.b8.nz
+# cat >$f <<EOF
+# key b8.nz. {
+# algorithm HMAC-MD5;
+# secret "$(awk '$1 == "Key:" {print $2}' Kb8.nz.*.private)";
+# };
+# EOF
+
+# chmod 640 $f
 
-chmod 640 $f
+# myunison -ob li
+# ssh li conflink
+# ssh li ser restart bind9