Update notifier for Ubuntu servers
Probably if you are running Ubuntu on your desktop you will be running the update notifier applet that notifies you about available updates of your installed packages. It is very handy as it is a maintenance job easy to forget.
The drawback of this utility is that it only runs on a desktop, meaning you can't use it when the machine is running under the usual server configuration (ie, with no GUI).
Anyway, it's quite easy to write a simple script that notifies you by mail. Create a new file on /etc/cron.daily directory called update-notifier (don't forget to chmod +x it) with the following content:
#!/bin/bash
apt-get update -qq && apt-get upgrade -sqq
From now, you will receive a mail when new updates are available:
/etc/cron.daily/update-notifier:
Inst libcupsys2 [1.2.8-0ubuntu8] (1.2.8-0ubuntu8.1 Ubuntu:7.04/feisty-security)
Conf libcupsys2 (1.2.8-0ubuntu8.1 Ubuntu:7.04/feisty-security)
Update (08/11/07)
I forgot the make the file executable step.
Comment this post
Fields marked with * are required.