lots of updates
[distro-setup] / distro-end
index 4fb10dbf1291d2e3e905b64b3c831e51a96c1ba0..285b25cd4e4e834806d428c9e7c0afad2310e106 100755 (executable)
@@ -61,6 +61,8 @@ case $HOSTNAME in
         # universal packages
         # swh-plugins is for karaoke pulsaudio filter.
         # mutagen for pithos
+        # guvcview set webcam brightness to highest
+        # pidgin-otr, i went into pidgin pluggin settings and generated a key for some accounts
         simple_packages+=(
             apache2
             apache2-doc
@@ -72,14 +74,17 @@ case $HOSTNAME in
             beets-doc
             binutils-doc
             bind9-doc
+            bind9-utils
             bwm-ng
             chromium
             cpio-doc
             cloc
+            cpulimit
             cron
             debconf-doc
             dirmngr
             dnsutils
+            dnsmasq
             dtrx
             duplicity
             eclipse
@@ -87,6 +92,7 @@ case $HOSTNAME in
             fdupes
             feh
             filelight
+            flashrom
             gawk-doc
             gcc-doc
             gdb
@@ -99,6 +105,7 @@ case $HOSTNAME in
             goaccess
             gnome-screenshot
             gnome-session-flashback
+            guvcview
             i3lock
             inetutils-traceroute
             iproute2-doc
@@ -118,6 +125,7 @@ case $HOSTNAME in
             nginx-doc
             nmap
             offlineimap
+            oathtool
             p7zip
             paprefs
             parted-doc
@@ -126,10 +134,12 @@ case $HOSTNAME in
             perl-doc
             pianobar
             pidgin
+            pidgin-otr
             pry
             python-autopep8
             python3-doc
             python3-mutagen
+            qrencode
             reportbug
             $(aptitude show ruby | sed -rn 's/Depends: (.*)/\1/p')-doc
             sqlite3-doc
@@ -141,6 +151,7 @@ case $HOSTNAME in
             transmission-remote-gtk
             vlc
             whois
+            wondershaper
         )
         spa $(apt-cache search ruby[.0-9]+-doc| awk '{print $1}')
         ;;
@@ -592,6 +603,7 @@ EOF
 
         ############# end setup mastodon ##############
 
+        # we use nsupdate to update the ip of home
         pi bind9
 
         echo "$0: $(date): ending now)"
@@ -603,6 +615,26 @@ esac
 ########### end section including li/lj ###############
 
 if [[ $HOSTNAME == treetowl ]]; then
+
+    # vpn-server setup via:
+
+    vpn-server-setup -r -d
+    s tee -a /etc/openvpn/server/server.conf <<'EOF'
+push "dhcp-option DNS 192.168.1.1"
+push "route 192.168.1.0 255.255.255.0"
+client-connect /a/bin/distro-setup/vpn-client-connect
+EOF
+    s sed -i --follow-symlinks 's/10.8./10.9./g' /etc/openvpn/server/server.conf
+    ser restart openvpn-server@server
+    vpn-mk-client-cert -s /etc/update-resolv-conf-home -c x2 -n home b8.nz
+    dir=/p/c/machine_specific/x2/filesystem/etc/openvpn/client
+    mkdir -p $dir
+    # background: We have these files locally, but we\'d have to duplicate the logic
+    # in vpn-mk-client-cert to get them, and this is just simpler.
+    scp root@x2:/etc/openvpn/client/home* $dir
+
+
+
     # note, see bashrc for more documentation.
     pi rss2email
     s dd of=/etc/systemd/system/rss2email.service <<'EOF'
@@ -927,7 +959,7 @@ EOF
   "profiles" : [
     {
       "profile-name" : "Default",
-      "hostname" : "transmission",
+      "hostname" : "transmission.b8.nz",
       "rpc-url-path" : "/transmission/rpc",
       "username" : "",
       "password" : "$rpc_pass",
@@ -1671,7 +1703,7 @@ if [[ $HOSTNAME == treetowl ]]; then
     # path: k/music. Then copied the file
     # /p/c/subdir_files/.kodi/userdata/sources.xml to save that setting.
     s a2enmod dav dav_fs
-    web-conf -r /a/c/playlists - apache2 dav.iank.pw <<'EOF'
+    web-conf -r /a/c/playlists - apache2 dav.$HOME_DOMAIN <<'EOF'
 <Directory /a/c/playlists>
     DAV On
   AuthType Basic
@@ -1686,7 +1718,7 @@ if [[ $HOSTNAME == treetowl ]]; then
 EOF
     s mkdir -p /var/www/davlock
     s chown www-data:www-data /var/www/davlock
-    s sed -i "1i DavLockDB /var/www/davlock/davlock" /etc/apache2/sites-enabled/dav.iank.pw.conf
+    s sed -i "1i DavLockDB /var/www/davlock/davlock" /etc/apache2/sites-enabled/dav.$HOME_DOMAIN.conf
     ser reload apache2
 
     teeu /etc/exports "/k/music *(ro,nohide,async,no_subtree_check,insecure)"