Automatic restart of services on upgrade

Sometimes after an upgrade of the system, there might be a few tasks that needs to be done. For example, aplications or services migh need to be restarted for the new version to be used/in use.

While libalpm/pacman does not have hooks, and neither does kalu, I thought I'd just take a little time to highlight the fact that kalu does support the start of post-sysupgrade processes.

For example, I use this to start localepurge after every sysupgrade (or package installation, though then through my use of alias (function, actually) for pacman) to save some space.

I also have PkgClip, to keep pacman's cache trimmed, and not long ago I added a little script to list deleted librairies in use.

And now, with kalu 1.0.0, I was even able to add a few more things. Besides having the option to remove the confirmation before starting anything, you can now use variable $PACKAGES which will be replaced by the list of packages involved.

While this isn't meant to replace hooks, it can be used to trigger some actions (or alerts, or anything you want really) based on whether a package has been upgraded or not.

In my case, I simply look for packages for which I know some service will need to be restarted, and after a confirmation a new terminal will be opened for said restart to take place.

It certainly doesn't mean you shouldn't check what gets upgraded or read the log, it just helps making things a little easier/faster, which is always nice.

If you're curious, here's the script I have automatically started by kalu after a sysupgrade, as postsysupgrade kalu $PACKAGES

Top of Page