X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-end;h=14cc2f52ddca1ff5d0ea158f9d7d55e7734ba47f;hb=80be8ed466553bef7f47edf4d15a69ace460f3da;hp=bc334d659261c84d032cba53e273130b6d0f90e4;hpb=f95f9128ba77e77d41389810affd475581075246;p=distro-setup diff --git a/distro-end b/distro-end index bc334d6..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,20 +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 dpkg-reconfigure -u -fnoninteractive unattended-upgrades -# Setup daily reboots, so all unattended upgrades go into affect -# unattended upgrades happen at 6 am + rand(60 min). -echo '20 7 * * * root /usr/local/bin/zelous-unattended-reboot' | s dd of=/etc/cron.d/unattended-upgrade-reboot -case $(debian-codename) in - flidas) - if [[ ! -e /usr/local/bin/checkrestart ]]; then - ;; -esac +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 @@ -725,20 +745,60 @@ EOF p update fi - # needed for false positive in checkrestart s dd of=/etc/apt/preferences.d/debian-goodies <$t </dev/null; then guix package --install guile fi -# install rust +# install rust. curl https://sh.rustup.rs -sSf | bash -s -- -y -cargo install ripgrep +# todo: update this. updates in rust are stupidly complicate +if ! which rg &>/dev/null; then + cargo install ripgrep +fi #### tor case $distro in