comparison 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
comparison
equal deleted inserted replaced
821:7c2dbd45c346 822:570ace9ed7c2
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # script to see if ubuntu is up to date 3 set -e
4 4
5 # -s = dry run 5 # script to update ubuntu
6 if apt-get update -y 6 # Ref:
7 # http://mixeduperic.com/ubuntu/how-to-keep-your-ubuntu-server-updated-with-patches-and-security-fixes-using-the-command-line
8
9
10 if sudo apt-get update -y
7 then 11 then
8 apt-get -u -s upgrade 12 # -s = dry run
13 # sudo apt-get -u -s -y upgrade
14
15 sudo apt-get -u -y upgrade
16
17 # TODO: sudo apt-get -u -s dist-upgrade
18
9 fi 19 fi
20
21 # cleanup
22 sudo apt -y autoremove