small fixes and additions
authorIan Kelling <ian@iankelling.org>
Sun, 25 Sep 2016 04:22:24 +0000 (21:22 -0700)
committerIan Kelling <ian@iankelling.org>
Sun, 25 Sep 2016 04:22:24 +0000 (21:22 -0700)
distro-begin
distro-end
input-setup
postfix-setup

index 39972179d4fb223a12d1aa33ff3e98afdeef6324..1c15acf25725d080de5f286e6b7dcda6affab34d 100755 (executable)
 # limitations under the License.
 
 
-# todo. dunno why, but original bootstrap of timezone is not sticking.
-# fixed manually with:
-# s dpkg-reconfigure tzdata
-# enter 12 then 11.
 
 
 # for bootstrapping a new machine
 
-# to make ssh interactive shell run better, first run this:
+# in case we need it,
+# to make ssh interactive shell run better, we run this first.
 sudo bash -c 'source /a/c/repos/bash/.bashrc && source /a/exe/ssh-emacs-setup'
 
 
@@ -73,8 +70,8 @@ fi
 for f in iank-dev htpc treetowl x2 frodo tp li lj demohost; do
     eval "$f() { [[ $HOSTNAME == $f ]]; }"
 done
-has_p() { iank-dev || x2 || frodo || tp; }
-has_x() { ! { lj || li || demohost; }; }
+has_p() { treetowl || iank-dev || x2 || frodo || tp || demohost; }
+has_x() { ! { lj || li; }; }
 linode() { lj || li; }
 encrypted() { has_p; }
 
@@ -572,7 +569,7 @@ s chown ian:ian  "${dirs[@]}"
 
 if [[ $HOSTNAME == treetowl ]]; then
     tu /etc/fstab <<'EOF'
-UUID=3f7b31cd-f299-40b4-a86b-7604282e2715 /i btrfs  noatime    0 2
+/dev/disk/by-id/ata-TOSHIBA_MD04ACA500_84REK6NTFS9A-part1 /i btrfs  noatime,subvol=i  0 0
 EOF
 else
     tu /etc/fstab <<'EOF'
@@ -697,6 +694,24 @@ if isubuntu; then
     s dd of=/etc/default/apport <<<'enabled=0'
 fi
 
+# fai sets this an old way that doesn't work for stretch.
+# no harm in setting it universally here.
+# using debconf-set-selection, the area gets reset to ETC
+# on my linode test machine after doing a dpkg-reconfigure, or a reinstall,
+# so we are using expect :(
+apt-get install --no-install-recommends expect
+s expect <<EOF
+set force_conservative 0
+spawn dpkg-reconfigure tzdata -freadline
+expect -nocase timeout {exit 1} "Geographic area:"
+send "12\r"
+expect -nocase timeout {exit 1} "Time zone:"
+send "11\r"
+expect eof
+exit
+EOF
+
+
 if has_x; then
     if isarch; then
         # install so it's build dependencies don't get removed.
@@ -780,6 +795,6 @@ EOF
     fi
 fi
 
-# the first pup command can kill off our /etc/
-/a/bin/ssh-emacs-setup
+# the first pup command can kill off our /etc/ mod, so rerun this
+/a/exe/ssh-emacs-setup
 echo "$0: $(date): ending now"
index bb6dafe0e9b83217b7e630af23901c352af58924..13a4dd102c6c8d49b6993155d79cbf1362abe9ae 100755 (executable)
@@ -43,10 +43,10 @@ esac
 pup
 
 simple_packages=(
-    rdiff-backup
     htop
     mailutils
     nmon
+    rdiff-backup
     ruby
     ruby-rest-client
     tree
@@ -67,6 +67,7 @@ case $HOSTNAME in
             fdupes
             filelight
             gdb
+            goaccess
             gnome-screenshot
             jq
             locate
@@ -805,6 +806,17 @@ DEVICESCAN -a -o on -S on -n standby,q $sched\
 ########### misc stuff
 
 
+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
@@ -1059,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)"
index 67444511e037323429d094e6c69f5e7dc41f1ca0..1cd3f6f52803ae837885c9189291e630dadf204f 100755 (executable)
@@ -22,6 +22,10 @@ set_device_id() {
 }
 
 case $HOSTNAME in
+       tp)
+               # original saved with: xkbcomp $DISPLAY /a/c/stretch-9-2016.xkb
+               xkbcomp /a/c/tp.xkb $DISPLAY
+               ;;
     treetowl*|iank-dev|frodo)
         # todo, differentiate for work pc
        #/a/bin/radl
index fdd739beee273e31dc0a79177d2448992764ef86..2d187fe47c3af33f251ee96efe7bbcb07f9a77a3 100755 (executable)
@@ -26,7 +26,7 @@ else
     relayhost="[email-smtp.us-west-2.amazonaws.com]:587"
 fi
 if isdeb; then
-    s debconf-set-selections<<EOF
+    s debconf-set-selections <<EOF
 postfix postfix/main_mailer_type select Satellite system
 postfix postfix/mailname string $host
 postfix postfix/relayhost string $relayhost