dsign iankelling.org expertpathologyreview.com zroe.org amnimal.ninja
lipush
for h in li bk; do
- e sshing $h
- ssh $h.b8.nz <<'EOF'
-source ~/.bashrc
-m dnsup
-EOF
+ m ssh $h.b8.nz dnsup
done
}
bindpushb8() {
lipush
for h in li bk; do
- e sshing $h
- ssh $h.b8.nz <<'EOF'
-source ~/.bashrc
-m dnsb8
-EOF
+ m ssh $h.b8.nz dnsb8
done
}
dnsb8() {
local f=/var/lib/bind/db.b8.nz
m ser stop named
- m sleep 1
- m sudo rm -fv $f.jnl $f.signed.jnl
+ # jbk is like a temp file. dunno if removing it helps
+
+ i=0
+ while pgrep '^named$' &>/dev/null; do
+ sleep .5
+ i=$(( i + 1 ))
+ if (( i > 100 )); then
+ echo "dnsb8: error: timeout waiting for named to exit"
+ return 1
+ fi
+ done
+ m sudo rm -fv $f.jnl $f.signed.jnl $f.jbk
m sudo install -m 644 -o bind -g bind /p/c/machine_specific/vps/bind-initial/db.b8.nz $f
m ser restart named
}
umask $umask_orig
}
+host-info-all() {
+ host-info-update
+ bindpushb8
+ wrt-setup
+}
+
+
+# if you change a host's ip, then run
+# bindpushb8
+# wrt-setup
host-info-update() {
local -A vpn_ips host_ips host_macs nonvpn_ips
EOF
- grep -E '^[a-z0-9]+[[:space:]]' /p/c/machine_specific/vps/bind-initial/db.b8.nz | awk '{print $1,$3}'
-
local host ipsuf f files
sedi '/edits below here are made automatically/,$d' /p/c/machine_specific/li/filesystem/etc/wireguard/wgmail.conf
echo 'local-data-ptr: "$l.'$ipsuf $host.b8.nz'"'
done
echo "EOF"
- } | u /p/ptr-data
+ } | u /p/c/ptr-data
{
echo "cat <<EOF"
echo "dhcp-host=${host_macs[$host]},set:$host,\$l.$ipsuf,$host"
done
echo "EOF"
- } | u /p/dnsmasq-data
+ } | u /p/c/dnsmasq-data
{
for host in ${!nonvpn_ips[@]}; do
}
+# grep + find
+gef() {
+ faf | grep -E "$@" ||:
+ rgv "$@"
+}
+
# rg my main files
rgm() {
rg "$@" /p/w.org /a/t.org /a/work.org /b
}
# re all my files more expansively
-
rem() {
local paths
paths="/p/c /b/"