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

Re: apt-* notify for new packages ? (update)



On Mon, 10 Mar 2003 18:41:10 Shaun Crossley wrote:
You might be interested in this script I came up with upon reading this
thread.  I called it apt-show-versions and placed it in /etc/cron.daily
(and made it executable via chmod +x).

[snip]

#!/bin/sh
# /etc/cron.daily/apt-show-new: email alerts when new packages
# are available
#
# 2003-03-10, Shaun Crossley, shaun@whatever.ca

ADMINMAIL=you@example.com

   /usr/bin/apt-get update -qq

/usr/bin/apt-show-versions -u | /usr/bin/sort | /usr/bin/mail -e \
     -s "`/bin/hostname`: updated packages available" $ADMINMAIL

Oops... if you don't run apt-get update first (as I've shown above) you won't get all the new good stuff. (I also changed it so that the output will be sorted.)

Most of you probably already figured that out, but I only just clued in.

Sorry!

--

Shaun Crossley
mailto:shaun@whatever.ca
http://www.whatever.ca



Reply to: