fixes and some improvements
[distro-setup] / distro-end
index 61fec8ac34caea4a0081d5f58b0f09825cab74f0..32a4b0e97273193a04a7ce44d2ed6043b0483af9 100755 (executable)
@@ -1831,6 +1831,11 @@ DEVICESCAN -a -o on -S on -n standby,q $sched \
 
 ########### misc stuff
 
+# pressing tab after sdf here:
+# scp sdfbash: set +o noglob: command not found
+# in t11, bash 5.1.16. this fixes it.
+sudo sed -ri 's/([[:space:]]*)(\$reset)$/\1set +o noglob #$reset/' /usr/share/bash-completion/bash_completion
+
 rm -fv /home/iank/.mpv/watch_later
 rm -rf /home/iank/.mpv
 
@@ -1847,6 +1852,20 @@ if [[ ! -e ~/.local/bin/pip ]]; then
   hash -r
 fi
 
+# notes about barrier
+# run barrier, do the gui config,
+# setup the 2 screens, using hostnames for the new screen.
+# save the server config
+# $HOME/.local/share/barrier/.barrier.conf
+# per the man page.
+#
+# ssl errors, resolved via advice here: https://github.com/debauchee/barrier/issues/231
+# BARRIER_SSL_PATH=~/.local/share/barrier/SSL/
+# mkdir -p "${BARRIER_SSL_PATH}"
+# openssl req -x509 -nodes -days 365 -subj /CN=Barrier -newkey rsa:4096 -keyout ${BARRIER_SSL_PATH}/Barrier.pem -out ${BARRIER_SSL_PATH}/Barrier.pem
+# ran on both machines.
+# When pressing start in the gui, the cli options used are printed to the console,
+# they are useful. So on server, just run barriers, client run barrierc SERVER_IP
 
 ### begin timetrap setup
 if mountpoint /p &>/dev/null; then
@@ -2047,16 +2066,18 @@ esac
 
 ### begin nagios ###
 
-pi nagios4
-s rm -fv /etc/apache2/conf-enabled/nagios4-cgi.conf
+case $HOSTNAME in
+  kd)
+    pi nagios4
+    s rm -fv /etc/apache2/conf-enabled/nagios4-cgi.conf
 
-# to add a password for admin:
-# htdigest /etc/nagios4/htdigest.users Nagios4 iank
-# now using the same pass as prometheus
+    # to add a password for admin:
+    # htdigest /etc/nagios4/htdigest.users Nagios4 iank
+    # now using the same pass as prometheus
 
-# nagstamon auth settings, set to digest instead of basic.
+    # nagstamon auth settings, set to digest instead of basic.
 
-web-conf -p 3005 - apache2 i.b8.nz <<'EOF'
+    web-conf -p 3005 - apache2 i.b8.nz <<'EOF'
 # adapted from /etc/apache2/conf-enabled/nagios4-cgi.conf
 
 ScriptAlias /cgi-bin/nagios4 /usr/lib/cgi-bin/nagios4
@@ -2104,7 +2125,8 @@ Alias /nagios4 /usr/share/nagios4/htdocs
     Options    +ExecCGI
 </Directory>
 EOF
-
+    ;;
+esac
 
 # when you alter a service through the web, it changes vars in /var/lib/nagios4/status.dat. for example:
 # notifications_enabled=1
@@ -2137,6 +2159,21 @@ EOF
 
 ### end nagios ###
 
+### begin bitcoin ###
+
+case $HOSTNAME in
+  sy)
+    f=$dir/bitcoin.conf
+    sudo install -m 0755 -o root -g root -t /usr/bin /a/opt/bitcoin-23.0/bin/*
+    sgo bitcoind
+    sudo usermod -a -G bitcoin iank
+    # todo, link in wallet. see
+    # /a/bin/ds/disabled/bitcoin
+    ;;
+esac
+
+### end bitcoin
+
 
 end_msg <<'EOF'
 In mate settings settings, change scrolling to two-finger,