5 # Simple wrapper script for cron to use - check for updated packages
6 # and mail admin with any recommended upgrades.
8 # Assumes that apt is configured correctly before we start...
10 # Steve McIntyre 26/09/2001
12 . /etc/apt/update.conf
14 if [ "$MAILTO"x = ""x ] ; then
18 UPDATE_LIST=`apt-update`
21 if [ "$UPDATE_LIST"x != ""x ] ; then
22 # Now send mail to the local admin
23 UPDATE_LIST="On $HOST the following packages need upgrading:\n$UPDATE_LIST"
24 echo -e "$UPDATE_LIST" | mail -s "$HOST needs software updates" $MAILTO