[Gllug] apt upgrade notification
Bruce Richardson
itsbruce at uklinux.net
Tue Dec 18 13:31:12 UTC 2001
On 12/18/01, 1:59:34 PM, SteveC <steve at fractalus.com> wrote regarding
[Gllug] apt upgrade notification:
> I'd like apt to mail me when upgrades are available so cron.daily would
> run apt-get update and then some method of determining whether there are
> new packages. Maybe if apt-get --dry-run -u upgrade was longer than x
> number of lines then I'd get a mail, or something...? Any ideas?
Put this in a cron job
apt-get update > /dev/null
apt-get -s upgrade | grep -v -e '\(^0 packages\|^Reading\|^Building\)'
If there are no upgrades waiting, this produces no output and so nothing
is mailed to you. If there are upgrades then there is output (the list
of upgrades) which is mailed to you (assuming you have set MAILTO
correctly or have root as an alias to your e-mail address).
--
Bruce
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list