X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=filesystem%2Fusr%2Flocal%2Fbin%2Fmyupgrade;h=1b39e7ff1c881f5b63432319b4a59aa13fa108de;hb=f91bdcc85d4742254fefc2c9880a0c76dc2a65ed;hp=55e722135bd203055b81a21cd15652f5e2d79523;hpb=6459d4698ef983f7b1540589b87013c76913393d;p=distro-setup diff --git a/filesystem/usr/local/bin/myupgrade b/filesystem/usr/local/bin/myupgrade index 55e7221..1b39e7f 100755 --- a/filesystem/usr/local/bin/myupgrade +++ b/filesystem/usr/local/bin/myupgrade @@ -13,6 +13,15 @@ if [[ $HOSTNAME == "$MAIL_HOST" || $hn == li.b8.nz ]]; then exit 0 fi +l() { + "$@" |& systemd-cat -t myupgrade +} +l /a/bin/buildscripts/tor-browser +l /a/bin/buildscripts/go +l /a/bin/buildscripts/rust +l /a/bin/buildscripts/misc +l go get -u mvdan.cc/fdroidcl + cmd="$s /usr/sbin/checkrestart -p" if [[ $($cmd | sed '/^Found 0 processes using old versions of upgraded files$/d' | wc -l) != 0 ]]; then $cmd -v | pee cat "wall -n" @@ -25,6 +34,7 @@ if [[ -s /var/log/checkrestart.log ]]; then done for x in {30..1}; do if ! fuser /var/lib/dpkg/lock &> /dev/null; then + echo "pid $PID. unattended upgrade, rebooting now" | pee cat "wall -n" /sbin/reboot exit 0 fi