iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor fix
[distro-setup]
/
dynamic-ip-update
diff --git
a/dynamic-ip-update
b/dynamic-ip-update
index 185eef2ec0adbd1a54e14fa73465ea9bbb314eb9..1f55f4c458145c6c600d6910a1108aee4521fd21 100755
(executable)
--- a/
dynamic-ip-update
+++ b/
dynamic-ip-update
@@
-1,4
+1,4
@@
-#!/bin/bash
+#!/bin/bash
-l
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
@@
-54,6
+54,7
@@
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 wrt.b8.nz. 300 A $ip4
EOF
update add b8.nz. 300 A $ip4
update add wrt.b8.nz. 300 A $ip4
EOF
@@
-79,17
+80,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
@@
-102,6
+106,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