X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-end;h=14cc2f52ddca1ff5d0ea158f9d7d55e7734ba47f;hb=80be8ed466553bef7f47edf4d15a69ace460f3da;hp=84566b89fa4299468c147d69bd2e60ee97911166;hpb=28904b44d0dd6ce9d43ab720b5efe9af2ce336de;p=distro-setup diff --git a/distro-end b/distro-end index 84566b8..14cc2f5 100755 --- a/distro-end +++ b/distro-end @@ -15,8 +15,9 @@ ### setup source /a/bin/errhandle/err -src="$(readlink -f -- "$BASH_SOURCE")"; src=${src%/*} # directory of this file +src="$(readlink -f -- "${BASH_SOURCE[0]}")"; src=${src%/*} # directory of this file +# shellcheck source=./pkgs source $src/pkgs set -x @@ -35,6 +36,7 @@ spa() { # simple package add simple_packages+=($@) } distro=$(distro-name) +codename=$(debian-codename) codename_compat=$(debian-codename-compat) pending_reboot=false sed="sed --follow-symlinks" @@ -184,15 +186,38 @@ sgo certbotmail.timer pi ${p1[@]} ##### begin automatic upgrades #### -# this makes it so we upgrade everything -s debconf-set-selections <<'EOF' -unattended-upgrades unattended-upgrades/origins_pattern string "codename=${distro_codename}"; + +s dd of=/etc/apt/apt.conf.d/10periodic <<'EOF' +# this file was mostly just comments. +APT::Periodic::Update-Package-Lists "1"; +APT::Periodic::Download-Upgradeable-Packages "1"; +APT::Periodic::AutocleanInterval "7"; +APT::Periodic::Unattended-Upgrade "1"; +EOF + +s dd of=/etc/apt/apt.conf.d/50unattended-upgrades <>.env.production done found=false - while read -r domain port pass; do + while read -r domain _ pass; do if [[ $domain == mail.iankelling.org ]]; then found=true # remove the username part @@ -759,6 +784,21 @@ EOF # newer version needed for false positive in checkrestart p install -y --allow-unauthenticated debian-goodies + s dd of=/etc/apt/preferences.d/shellcheck <