Ubuntu Update Script

# automatic update script for ubuntu servers
# By John R. Beckett, johnreabeckett@gmail.com
# Recommended crontab entry for root user to update weekly:
# 6 5 * * 0 /bin/bash /u/standard/linuxupdate_ubuntu >/dev/null 2>&1
# This prevents "TERM is not set, so the dialog frontend is not usable." error
PATH="$PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
MAILTO=""
dpkg --configure -a
aptitude update -y
apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade -y
aptitude autoclean -y
apt-get autoremove -y
shutdown -r now

On Ubuntu use the unattended-upgrades package.

Scripts/UpdateScript (last edited 2021-02-09 22:12:18 by scot)