[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: notify via virtual terminal available packages



On Wed, 23 Sep 2020 22:36:36 +0200
Pòl Hallen <deben@fuckaround.org> wrote:

> like ubuntu, what's the best way to show a notify alert (via
> terminal) about available packages?

I take it you mean, *new* available packages. I don't know how Ubuntu
does it, so I'll tell you what I do. And the answer depends on what you
want to do.

You could install unattended-upgrades, and let that notify you (via
email) of packages it has already upgraded for you and the occasional
reboot required.

If that's a bit too trusting, set a cron job to pull in new packages,
but not install them. I use:

   5      3      *                *	*	root	sleep $( echo $((1 + RANDOM \% 1200)) ) ; /usr/bin/apt-get update > /dev/null && /usr/bin/apt-get -dy dist-upgrade > /dev/null

The sleep command waits for up to 1200 seconds. That is there because I
have a small herd of computers here and way back when I was on dial-up
I did not want to swamp my connection.

The apt-get update does an update, and throws away the output.

Same with the dist-upgrade. The -d does a download only.

You could follow that with "apt list --upgradable -a" so cron will
email you a list of available upgrades. Or you could run that manually
when you are ready. I just run "apt upgrade" when I am ready. As I
mentioned, I have a small herd of computers. I run a shell script based
on mssh to check all of them for updates.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Reply to: