small fixes and additions
[distro-setup] / distro-end
index ea99357c14cad178f563bc17641b76f139920e91..13a4dd102c6c8d49b6993155d79cbf1362abe9ae 100755 (executable)
@@ -46,6 +46,7 @@ simple_packages=(
     htop
     mailutils
     nmon
+    rdiff-backup
     ruby
     ruby-rest-client
     tree
@@ -66,10 +67,12 @@ case $HOSTNAME in
             fdupes
             filelight
             gdb
+            goaccess
             gnome-screenshot
             jq
             locate
             meld
+            nmap
             offlineimap
             p7zip
             paprefs
@@ -77,7 +80,6 @@ case $HOSTNAME in
             pdfgrep
             pianobar
             pidgin
-            rdiff-backup
             slock
             squashfs-tools
             swh-plugins
@@ -196,7 +198,10 @@ case $(distro-name) in
         # this says disabling the service, it will still get restarted
         # but this script doesn't do anything on restart, so it should be fine
         s dd of=/var/run/motd.dynamic if=/dev/null
-        s update-rc.d motd disable
+        # stretch doesn't have initscripts pkg installed by default
+        if [[ $(debian-codename) == jessie ]]; then
+            s update-rc.d motd disable
+        fi
         ;;
     ubuntu)
         # this isn't a complete solution. It still shows me when updates are available,
@@ -212,7 +217,7 @@ esac
 # /usr/share/doc/unattended-upgrades# cat README.md
 # /etc/apt/apt.conf.d/50unattended-upgrades
 if isdebian; then
-    debian-setup-auto-update
+    setup-debian-auto-update
 fi
 
 # we've got a few dependencies later on, so install them now.
@@ -227,11 +232,10 @@ case $HOSTNAME in
             li) domain=iankelling.org ;;
         esac
         /a/h/setup.sh $domain
-        s rld /a/h/_site/ /var/www/$domain/html
-
-        curl https://$domain/git/?p=mediawiki-setup/.git;a=blob_plain;f=mw-setup-script;hb=HEAD | bash
-        $src/phab-setup
+        /a/h/build.rb
 
+        sudo -E /a/bin/mediawiki-setup/mw-setup-script
+        #$src/phab-setup
 
         echo "$0: $(date): ending now)"
         exit 0
@@ -720,6 +724,8 @@ Accept=false
 [Install]
 WantedBy=sockets.target
 EOF
+        # had this fail with 'Failed to connect to bus: No such file or directory'
+        # then when I tried it manually, it worked fine...
         systemctl --user daemon-reload
         ;;&
     *)
@@ -800,8 +806,19 @@ DEVICESCAN -a -o on -S on -n standby,q $sched\
 ########### misc stuff
 
 
-if ! sudo test -e /etc/openvpn/client.key; then
-    /a/bin/vpn-setup/vpn-mk-client-cert
+s cedit /etc/goaccess.conf <<'EOF'
+# all things found from looking around the default config
+# copied existing NCSA Combined Log Format with Virtual Host, plus %L
+log-format %^:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u" %L
+time-format %H:%M:%S
+date-format %d/%b/%Y
+log-file /var/log/apache2/access.log
+color-scheme 2
+EOF
+
+
+if [[ $HOSTNAME == frodo ]] && ! sudo test -e /etc/openvpn/client.key; then
+    /a/bin/vpn-setup/vpn-mk-client-cert dopub
 fi
 
 
@@ -1054,20 +1071,22 @@ fi
 
 case $distro in
     debian|ubuntu)
-# systemd claims it generates units from /etc/init.d, but it clearly doesn't
-# in debian. I have no idea how they are related. fuck debian right now. It's
-# not documented.  samba has a systemd init file linked to /dev/null.
-# There's this https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769714 which
-# claims samba's sub-services will be started automatically by systemd... it
-# didn't on install, wonder if it will on boot. It clued me in how to start
-# it manually though. Nothing in /usr/share/doc/samba, debian admin guide
-# says nothing about any of this. (this is in debian testing as of 4/2016).
-
-s /etc/init.d/samba start
-;;
-                        arch)
-                            sgo samba
-                            ;;
+        # systemd claims it generates units from /etc/init.d, but it
+        # clearly doesn\'t in debian. I have no idea how they are
+        # related. fuck debian right now. It\'s not documented.  samba
+        # has a systemd init file linked to /dev/null.  There\'s this
+        # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769714 which
+        # claims samba\'s sub-services will be started automatically by
+        # systemd... it didn\'t on install, wonder if it will on
+        # boot. It clued me in how to start it manually though. Nothing
+        # in /usr/share/doc/samba, debian admin guide says nothing about
+        # any of this. (this is in debian testing as of 4/2016).
+
+        s /etc/init.d/samba start
+        ;;
+    arch)
+        sgo samba
+        ;;
 esac
 
 tu /etc/hosts <<< "127.0.1.1 $(hostname).lan $(hostname)"