X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=distro-end;h=14cc2f52ddca1ff5d0ea158f9d7d55e7734ba47f;hp=84566b89fa4299468c147d69bd2e60ee97911166;hb=343a048be4b32d18540c6531048d2b9a006774ae;hpb=50e3ebaf4941651899a3b52b5245052c3f4ed725 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 <