Mercurial > hg > config
annotate bin/ubuntu_updated.sh @ 866:909f72bd6cb3
remove stopped containers
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Wed, 18 Jul 2018 09:29:20 -0700 |
parents | 570ace9ed7c2 |
children |
rev | line source |
---|---|
364 | 1 #!/bin/bash |
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 | 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 | 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 | 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 |