Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID
Advertise on

In this Discussion

Ubuntu Update Overview Script

Ubuntu Update Overview Script

RaymiiRaymii Member
edited September 2012 in General

Bash script to mail Ubuntu updates

This is a bash script for Ubuntu, to be run by cron on a set interval. It checks if there are apt-updates, and if so, mails an overview of the packages which can be updated, whith their local version, the version available and an URL to the Ubuntu package site where you can see the changelog. I wrote this as an addition for my Nagios monitoring, that only shows how many updates there are, this is a lot more verbose

Example output:

If there are no updates:

No updates available for host on date 21.09.2012

If there are updates:

--- Updates for host: ---
Date: 21.09.2012 

Total updates available: 44

-- Package: apport --
 Installed: 2.0.1-0ubuntu12
 Candidate: 2.0.1-0ubuntu13
Package Information:
-- End package apport --

-- Package: base-files --
 Installed: 6.5ubuntu6
 Candidate: 6.5ubuntu6.2
Package Information:
-- End package base-files --

-- Package: bind9-host --
 Installed: 1:9.8.1.dfsg.P1-4ubuntu0.2
 Candidate: 1:9.8.1.dfsg.P1-4ubuntu0.3
Package Information:
-- End package bind9-host --

-- Package: build-essential --
 Installed: 11.5ubuntu2
 Candidate: 11.5ubuntu2.1
Package Information:
-- End package build-essential --

-- Package: dbus --
 Installed: 1.4.18-1ubuntu1
 Candidate: 1.4.18-1ubuntu1.1
Package Information:
-- End package dbus --

The script

Quis custodiet ipsos custodes? - - Need a VPS Control Panel? - Need a VPS that doesn't suck?
Thanked by 1ErawanArifNugroho


Sign In or Register to comment.