Bash script to maintain/update a lot of Ubuntu servers / VMs in one go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Torsten Kurbad 2ed67b7ede Updated to support more ubuntu versions 1 year ago
.ubuntu-maintenance.rc Updated rc file 3 years ago
README.md Updated README 3 years ago
ubuntu-maintenance.rc.sample Initial content / updated README 3 years ago
ubuntu-maintenance.sh Updated to support more ubuntu versions 1 year ago

README.md

ubuntu-maintenance.sh

Bash-Script to remotely maintain/update a large number of Ubuntu machines in one go.

Installation

Preferably, copy ubuntu-maintenance.sh to /usr/local/bin:

sudo cp ubuntu-maintenance.sh /usr/local/bin/
sudo chmod 0755 /usr/local/bin/ubuntu-maintenance.sh
sudo chown root:root /usr/local/bin/ubuntu-maintenance.sh

Copy ubuntu-maintenance.rc.sample to your home directory and rename it to .ubuntu-maintenance.rc:

cp ubuntu-maintenance.rc.sample ~/.ubuntu-maintenance.rc

Using your favourite text editor, edit the SERVERS variable inside

Ubuntu machines you want to maintain.

Usage
-----

In a terminal window, type

ubuntu-maintenance.sh


to see which of your machines need updates, what kernel versions they
are running, and whether a reboot is needed or not.

Type

ubuntu-maintenance.sh -g


to start the maintenance process. You will be asked to confirm each
maintenance step for all your machines.

Add ```-y``` to the command line to skip all the queries for
confirmation in between the maintenance process and just keep going
automatically (not recommended for beginners!), e.g.

ubuntu-maintenance.sh -gy


Enter

ubuntu-maintenance.sh -h ```

to get a short usage instruction.

Enjoy!