Bug#113504: apt: Automatically notify admin about updates
Package: apt
Version: 0.5.3
Severity: wishlist
Tags: patch
Apt should (maybe optionally using debconf) create a cron job that
automatically does "apt-get update" and tells whomever receive cron
e-mail about any upgraded packages. I have the script
/etc/cron.daily/apt-update that looks like this:
-----
#!/bin/sh
# Keep the apt cache current
apt-get update > /dev/null
# Update the dselect cache from the apt cache
TEMPFILE=`mktemp /tmp/apt-update.XXXXXX`
apt-cache dumpavail > $TEMPFILE
dpkg --update-avail $TEMPFILE
rm $TEMPFILE
# Remind admin to keep the system current
apt-get dist-upgrade -u --trivial-only
-----
The script may need some work to get it working both with and without
dselect / dpkg. Also some people may prefer not getting any mail when
there aren't any updates. Whether the script should be included as-is
or not, I think this kind of script is something lots of people other
than me would find useful.
Cheers //Johan
-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux foo 2.2.19 #3 fre sep 7 22:47:38 CEST 2001 i686
Locale: LANG=sv_SE.ISO8859-1, LC_CTYPE=sv_SE
Versions of packages apt depends on:
ii libc6 2.2.4-1 GNU C Library: Shared libraries an
ii libstdc++2.10-glibc2.2 1:2.95.4-0.010902 The GNU stdc++ library
Reply to: