I have a few Ubuntu servers (8.10, 9.10) that is set to automatically install security updates. Some times these updates requires a restart of the system, and this string is shown in motd:
*** System restart required ***
To get a notice about these, I plan to write a Nagios test to monitor if the server is in need of a reboot. So, my question:
Is there a better way than parsing /etc/motd to find out if a reboot is needed?
/var/run/reboot-requireddoes not get created unless theupdate-notifier-commonpackage is installed. – Peter V. Mørch Jan 27 '12 at 07:50update-notifier-commonhas been removed in Debian Jessie.unattended-upgradesnow includes a simple script/etc/kernel/postinst.d/unattended-upgradeswhichtouches the file.reboot-notifieris another small package which is compatible with the format ofupdate-notifier-common. – ypid Jan 21 '16 at 08:45