Mercurial > hg > config
diff bin/ubuntu_updated.sh @ 822:570ace9ed7c2
make my life a little easier
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 06 Feb 2017 09:29:39 -0800 |
parents | 2e33cd82af58 |
children |
line wrap: on
line diff
--- a/bin/ubuntu_updated.sh Tue Jan 31 17:38:05 2017 -0800 +++ b/bin/ubuntu_updated.sh Mon Feb 06 09:29:39 2017 -0800 @@ -1,9 +1,22 @@ #!/bin/bash -# script to see if ubuntu is up to date +set -e + +# script to update ubuntu +# Ref: +# http://mixeduperic.com/ubuntu/how-to-keep-your-ubuntu-server-updated-with-patches-and-security-fixes-using-the-command-line + -# -s = dry run -if apt-get update -y +if sudo apt-get update -y then - apt-get -u -s upgrade + # -s = dry run + # sudo apt-get -u -s -y upgrade + + sudo apt-get -u -y upgrade + + # TODO: sudo apt-get -u -s dist-upgrade + fi + +# cleanup +sudo apt -y autoremove