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 LowEndTalk.com

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 vps11.sparklingclouds.nl on date 21.09.2012

If there are updates:

--- Updates for host: vps11.sparklingclouds.nl ---
Date: 21.09.2012 

Total updates available: 44

-- Package: apport --
 Installed: 2.0.1-0ubuntu12
 Candidate: 2.0.1-0ubuntu13
Package Information: http://packages.ubuntu.com/precise/apport
-- End package apport --

-- Package: base-files --
 Installed: 6.5ubuntu6
 Candidate: 6.5ubuntu6.2
Package Information: http://packages.ubuntu.com/precise/base-files
-- 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: http://packages.ubuntu.com/precise/bind9-host
-- End package bind9-host --

-- Package: build-essential --
 Installed: 11.5ubuntu2
 Candidate: 11.5ubuntu2.1
Package Information: http://packages.ubuntu.com/precise/build-essential
-- End package build-essential --

-- Package: dbus --
 Installed: 1.4.18-1ubuntu1
 Candidate: 1.4.18-1ubuntu1.1
Package Information: http://packages.ubuntu.com/precise/dbus
-- End package dbus --

The script

https://raymii.org/cms/p_Ubuntu_update_mailer

Quis custodiet ipsos custodes?
http://raymii.org - http://sparklingnetwork.nl - Need a VPS Control Panel? http://z1s.org/ - Need a VPS that doesn't suck? http://clients.inceptionhosting.com/aff.php?aff=083
Thanked by 1ErawanArifNugroho

Comments

Sign In or Register to comment.