Automatically restarting services after upgrades on Debian and Ubuntu
There are various tools to automatically keep a Debian/Ubuntu system security wise up to date, among others the unattended-upgrades package.
Also, there’s the checkrestart script from the debian-goodies package, that scans all the open files on a system and tries to determine to what service they belong and how that service might be restarted.
The last piece that’d tie all those scripts together and would automatically restart all services that are using stale libraries or files was missing.
With the help of Michal Fiala there however is now the restart-services script, that does just that.
The script has not seen much real world usage and as such should be regarded as experimental (f.ex. by restarting /etc/init.d/screen it will as of the time of writing terminate existing screen sessions).
The script currently lives on Github. If you encounter any problem with the script then we’ll very much wellcome a patch that fixes it…
Tomáš Pospíšek
Update 18.6.2012: The most recent checkrestart (from debian-goodies 0.61) now excludes screen from beeing listed among the services to be restarted.