annotate bin/ubuntu_updated.sh @ 862:e300310bb98c

note re pruning stopped docker containers
author Jeff Hammel <k0scist@gmail.com>
date Mon, 04 Jun 2018 15:35:03 -0700
parents 570ace9ed7c2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
364
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 #!/bin/bash
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2
822
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
3 set -e
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
4
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
5 # script to update ubuntu
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
6 # Ref:
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
7 # http://mixeduperic.com/ubuntu/how-to-keep-your-ubuntu-server-updated-with-patches-and-security-fixes-using-the-command-line
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
8
364
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
9
822
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
10 if sudo apt-get update -y
364
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
11 then
822
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
12 # -s = dry run
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
13 # sudo apt-get -u -s -y upgrade
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
14
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
15 sudo apt-get -u -y upgrade
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
16
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
17 # TODO: sudo apt-get -u -s dist-upgrade
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
18
364
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
19 fi
822
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
20
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
21 # cleanup
570ace9ed7c2 make my life a little easier
Jeff Hammel <k0scist@gmail.com>
parents: 364
diff changeset
22 sudo apt -y autoremove