From aa8ff7aafcbe3cc05b1394818abf1c2f00b78a52 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sat, 27 Aug 2016 12:45:27 -0700 Subject: [PATCH] small fixes and update for webserver --- distro-begin | 7 +++++++ distro-end | 9 ++++----- postfix-setup | 5 +++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/distro-begin b/distro-begin index a37a19b..222eb5c 100755 --- a/distro-begin +++ b/distro-begin @@ -77,6 +77,7 @@ for f in iank-dev htpc treetowl x2 frodo tp li lj demohost; do done has_p() { iank-dev || x2 || frodo || tp; } has_x() { ! { lj || li || demohost; }; } +linode() { lj || li; } encrypted() { has_p; } shopt -s extglob @@ -190,6 +191,11 @@ case $distro in ;; esac +if linode; then + sudo sed -i '/^127\.0\.1\.1/d' /etc/hosts + echo "127.0.1.1 $HOSTNAME.lan $HOSTNAME" | sudo tee -a /etc/hosts +fi + if [[ $EUID == 0 ]]; then echo "$0: running as root. exiting now that users are setup" @@ -618,6 +624,7 @@ fi # work desktop doesnt need gpg stuff, but it doesnt hurt s dd of=/etc/profile.d/environment.sh <<'EOF' # IAN: EDIT THIS FROM /a/bin/distro-setup/distro-begin +export ACME_TINY_WRAPPER_CERT_DIR=/p/c/machine_specific/$HOSTNAME/webservercerts if [ -f $HOME/path_add-function ]; then . $HOME/path_add-function diff --git a/distro-end b/distro-end index 2c63820..897e4e9 100755 --- a/distro-end +++ b/distro-end @@ -213,7 +213,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. @@ -228,11 +228,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 diff --git a/postfix-setup b/postfix-setup index 2ecbd6b..fdd739b 100755 --- a/postfix-setup +++ b/postfix-setup @@ -83,6 +83,11 @@ else fi e $forward > ~/.forward e $forward | s tee /root/.forward + +# linode image has a root alias. completely useless, remove it. +sudo sed -i '/^root:/d' /etc/aliases + + s newaliases # if I wanted the from address to be renamed and sent to a different address, -- 2.30.2