X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-end;h=14cc2f52ddca1ff5d0ea158f9d7d55e7734ba47f;hb=343a048be4b32d18540c6531048d2b9a006774ae;hp=91ae7e3ef0ceae5965fa2e48a2ecbfc39487923b;hpb=effc74a288ee7e4d0a83bbf3335ba10f95eb7b8a;p=distro-setup diff --git a/distro-end b/distro-end index 91ae7e3..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 @@ -764,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 </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