fixes, prometheus, lots of stuff
[distro-setup] / brc2
diff --git a/brc2 b/brc2
index 6b977839c870f2a4d37c0ae8bc3a3cc31aebe250..c233c9288354125d0d679f04deee6ee862666188 100644 (file)
--- a/brc2
+++ b/brc2
@@ -502,24 +502,23 @@ EOF
   done
 }
 bindpushb8() {
-  dsign iankelling.org expertpathologyreview.com zroe.org amnimal.ninja
   lipush
   for h in li bk; do
     m sl $h <<'EOF'
 source ~/.bashrc
-m dnsup
 m dnsb8
 EOF
   done
 }
 
 dnsup() {
-  conflink
+  conflink -f
   m ser reload bind9
 }
 dnsb8() {
   local f=/var/lib/bind/db.b8.nz
   ser stop bind9
+  sleep 1
   sudo rm -fv $f.jnl
   sudo install -m 644 -o bind -g bind /p/c/machine_specific/vps/bind-initial/db.b8.nz $f
   ser restart bind9
@@ -1075,8 +1074,8 @@ Address = 10.8.0.$ipsuf/24
 PostUp = ping -c1 10.8.0.1 ||:
 
 [Peer]
-# li
-PublicKey = zePGl7LoS3iv6ziTI/k8BMh4L3iL3K2t9xJheMR4hQA=
+# li. called wgmail on that server
+PublicKey = CTFsje45qLAU44AbX71Vo+xFJ6rt7Cu6+vdMGyWjBjU=
 AllowedIPs = 10.8.0.0/24
 Endpoint = 72.14.176.105:1194
 PersistentKeepalive = 25
@@ -1084,7 +1083,7 @@ EOF
   umask $umask_orig
   # old approach. systemd seems to work fine and cleaner.
   rm -f ../network/interfaces.d/wghole
-  cedit -q $host /p/c/machine_specific/li/filesystem/etc/wireguard/wghole.conf <<EOF || [[ $? == 1 ]]
+  cedit -q $host /p/c/machine_specific/li/filesystem/etc/wireguard/wgmail.conf <<EOF || [[ $? == 1 ]]
 [Peer]
 PublicKey = $(cat hole-pub.key)
 AllowedIPs = 10.8.0.$ipsuf/32
@@ -1524,14 +1523,14 @@ daylertme() {
   if [[ -t 0 ]]; then
     exim -t <<EOF
 From: alertme@b8.nz
-To: daylerts@iankelling.org
+To: daylert@iankelling.org
 Subject: $*
 EOF
   else
     read sub
     { cat <<EOF
 From: alertme@b8.nz
-To: daylerts@iankelling.org
+To: daylert@iankelling.org
 Subject: $sub
 
 EOF
@@ -1549,7 +1548,7 @@ alert200() {
     if torsocks wget -q "$url"; then
       alertme $tmpdir
     fi
-    sleep 600 + $(( RANDOM % 300 ))
+    sleep $(( 600 + RANDOM % 300 ))
   done
 }
 
@@ -1742,6 +1741,11 @@ vpn() {
   sudo systemd-tty-ask-password-agent
 }
 
+ufix() {
+  ls -lad /run/user/1000
+  s chmod 700 /run/user/1000; s chown iank.iank /run/user/1000
+}
+
 # systemctl is-enabled / status / cat says nothing, instead theres
 # some obscure symlink. paths copied from man systemd.unit.
 # possibly also usefull, but incomplete, doesnt show units not loaded in memory: