Skip to content

Instantly share code, notes, and snippets.

@johnypony3
Last active March 27, 2018 14:23
Show Gist options
  • Save johnypony3/13225db9b2e86f9131ee57bc2286034f to your computer and use it in GitHub Desktop.
Save johnypony3/13225db9b2e86f9131ee57bc2286034f to your computer and use it in GitHub Desktop.
EC2 Update, Dist-Upgrade, Log Config
#!/bin/bash -x
exec > >(tee /var/log/syslog|logger -t user-data -s 2>/dev/console) 2>&1
echo 'do full automated update and upgrade'
unset UCF_FORCE_CONFFOLD
export UCF_FORCE_CONFFNEW=YES
export DEBIAN_FRONTEND=noninteractive
ucf --purge /boot/grub/menu.lst
apt-get update
apt-get -o Dpkg::Options::="--force-confnew" --force-yes -fuy dist-upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment