# 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'
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; }
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'
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.
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"
pup
simple_packages=(
- rdiff-backup
htop
mailutils
nmon
+ rdiff-backup
ruby
ruby-rest-client
tree
fdupes
filelight
gdb
+ goaccess
gnome-screenshot
jq
locate
########### 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
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)"
}
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
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