--- /dev/null
+#!/bin/sh
+#
+# apt-update cron job
+#
+# Simple wrapper script for cron to use - check for updated packages
+# and mail admin with any recommended upgrades.
+#
+# Assumes that apt is configured correctly before we start...
+#
+# Steve McIntyre 26/09/2001
+
+. /etc/apt/update.conf
+
+if [ "$MAILTO"x = ""x ] ; then
+ MAILTO=postmaster
+fi
+
+UPDATE_LIST=`apt-update`
+HOST=`uname -n`
+
+if [ "$UPDATE_LIST"x != ""x ] ; then
+ # Now send mail to the local admin
+ UPDATE_LIST="On $HOST the following packages need upgrading:\n$UPDATE_LIST"
+ echo -e "$UPDATE_LIST" | mail -s "$HOST needs software updates" $MAILTO
+fi