fix btrbk service
[distro-setup] / distro-end
index c22e1130be39b67136dd60c5581f0776c1674771..0e7c4b8197dab344b80a00602e76365deaa84dfa 100755 (executable)
@@ -131,6 +131,7 @@ fi
 ###  end docker install ####
 
 
+
 ### begin certbot install ###
 case $distro in
   debian)
@@ -180,6 +181,22 @@ sgo certbotmail.timer
 
 pi ${p1[@]}
 
+
+## prometheus node exporter setup
+web-conf -f 9100 -p 9101 apache2 $(hostname -f) <<'EOF'
+#https://httpd.apache.org/docs/2.4/mod/mod_authn_core.html#authtype
+# https://stackoverflow.com/questions/5011102/apache-reverse-proxy-with-basic-authentication
+<Location />
+   AllowOverride None
+   AuthType basic
+   AuthName "Authentication Required"
+   # setup one time, with root:www-data, 640
+   AuthUserFile "/etc/prometheus-htpasswd"
+   Require valid-user
+</Location>
+EOF
+
+
 # website setup
 case $HOSTNAME in
   lj|li)
@@ -592,25 +609,27 @@ fi
 sgo fsf-vpn-dns-cleanup
 
 
-case $distro in
-  debian)
-    pi chromium ;;
-  trisquel|ubuntu)
-    wget -qO - https://downloads.iridiumbrowser.de/ubuntu/iridium-release-sign-01.pub|sudo apt-key add -
-    t=$(mktemp)
-    cat >$t <<EOF
-deb [arch=amd64] https://downloads.iridiumbrowser.de/deb/ stable main
-#deb-src https://downloads.iridiumbrowser.de/deb/ stable main
-EOF
-    f=/etc/apt/sources.list.d/iridium-browser.list
-    if ! diff -q $t $f; then
-      s cp $t $f
-      s chmod 644 $f
-      p update
-    fi
-    pi iridium-browser
-    ;;
-esac
+# website is dead june 14 2019
+s rm -f /etc/apt/sources.list.d/iridium-browser.list
+# case $distro in
+#   debian)
+#     pi chromium ;;
+#   trisquel|ubuntu)
+#     wget -qO - https://downloads.iridiumbrowser.de/ubuntu/iridium-release-sign-01.pub|sudo apt-key add -
+#     t=$(mktemp)
+#     cat >$t <<EOF
+# deb [arch=amd64] https://downloads.iridiumbrowser.de/deb/ stable main
+# #deb-src https://downloads.iridiumbrowser.de/deb/ stable main
+# EOF
+#     f=/etc/apt/sources.list.d/iridium-browser.list
+#     if ! diff -q $t $f; then
+#       s cp $t $f
+#       s chmod 644 $f
+#       p update
+#     fi
+#     pi iridium-browser
+#     ;;
+# esac
 
 
 ### begin home vpn server setup
@@ -712,6 +731,9 @@ EOF
 fi
 #########  end  pump.io periodic backup #############
 
+# https://github.com/jlebon/textern
+cd /a/opt/textern
+make native-install USER=1
 
 case $distro in
   debian|trisquel|ubuntu)
@@ -1349,17 +1371,24 @@ esac
 
 case $distro in
   arch)
+    pi virt-install
     # otherwise we get error about accessing kvm module.
     # seems like there might be a better way, but google was a bit vague.
     s $sed -ri '/^ *user *=/d' /etc/libvirt/qemu.conf
     echo 'user = "root"' | s tee -a /etc/libvirt/qemu.conf
-    # https://bbs.archlinux.org/viewtopic.php?id=206206
-    # # this should prolly go in the wiki
-    sgo virtlogd.socket
     # guessing this is not needed
     #sgo virtlogd.service
-    sgo libvirtd
+
+    # iank: disabed as im not using libvirt usually
+    # # https://bbs.archlinux.org/viewtopic.php?id=206206
+    # # # this should prolly go in the wiki
+    # sgo virtlogd.socket
+    # sgo libvirtd
+    ;;
+  debian|trisquel|ubuntu)
+    pi-nostart virtinst virt-manager
     ;;
+
 esac
 
 
@@ -1565,6 +1594,9 @@ s fc-cache
 /a/bin/distro-setup/mymimes
 
 
+sgo dynamicipupdate
+
+
 # stop autopoping windows when i plug in an android phone.
 # dbus-launch makes this work within an ssh connection, otherwise you get this message,
 # with still 0 exit code.