iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mostly fixes for new error handling
[distro-setup]
/
dynamic-ip-update
diff --git
a/dynamic-ip-update
b/dynamic-ip-update
index 007570cd53576637078596f0ce89ab326f20f425..e589f15dddfbc5765f4f3684d8cf12e310383937 100755
(executable)
--- a/
dynamic-ip-update
+++ b/
dynamic-ip-update
@@
-1,6
+1,5
@@
#!/bin/bash
#!/bin/bash
-set -eE -o pipefail
-trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
+source ~/.bashrc
fqdn=$(hostname -f)
fqdn=$(hostname -f)
@@
-54,7
+53,9
@@
EOF
if $up4; then
cat >>$f <<EOF
update delete b8.nz. A
if $up4; then
cat >>$f <<EOF
update delete b8.nz. A
+update delete wrt.b8.nz. A
update add b8.nz. 300 A $ip4
update add b8.nz. 300 A $ip4
+update add wrt.b8.nz. 300 A $ip4
EOF
fi
EOF
fi
@@
-78,17
+79,20
@@
answer
quit
EOF
quit
EOF
-nsupdate -k /p/c/machine_specific/li/filesystem/etc/bind/Kb8.nz.*.private <$f
+nsupdate -k /p/c/machine_specific/linode/filesystem/etc/bind/Kb8.nz.*.private <$f
+sed -i 's/^server .*/server l2.b8.nz/' $f
+nsupdate -k /p/c/machine_specific/linode/filesystem/etc/bind/Kb8.nz.*.private <$f
exit
# # persistent initial setup for this:
exit
# # persistent initial setup for this:
-# # create files in /a/c/machine_specific/li/filesystem/etc/bind
+# # create files in /a/c/machine_specific/li
node
/filesystem/etc/bind
# # note, conflink also does some group ownership stuff.
# # note, conflink also does some group ownership stuff.
-mkc /p/c/machine_specific/li/filesystem/etc/bind
+mkc /p/c/machine_specific/li
node
/filesystem/etc/bind
s dnssec-keygen -a HMAC-SHA512 -b 512 -n HOST b8.nz
s dnssec-keygen -a HMAC-SHA512 -b 512 -n HOST b8.nz
-s chown $USER:$USER *
+user=$(id -un)
+s chown $user:$user *
f=key.b8.nz
f=key.b8.nz
@@
-101,6
+105,7
@@
EOF
chmod 640 [kK]*
chmod 640 [kK]*
-myunison -ob li
-ssh li conflink
-ssh li ser restart bind9
+# push here?
+#myunison -ob li
+#ssh li conflink
+ssh li systemctl reload bind9