Showing posts from August, 2014

Systemd is the Cat's Pyjamas

I have been converting some of the startup scripts for my Open Identity Stack project to use systemd. Systemd is now available on Fedora, CentOS and Redhat - and is coming soon to Debian and Ubuntu (you can actually get it now in Debian testing).

What strikes me is how dead simple it is to create init services that just work.  Here is an example for openidm.service that leverages start/stop scripts that come with OpenIDM:

[Unit] Description=OpenIDM [Service] Type=simple ExecStart=/opt/ois/openidm/ ExecStop=/opt/ois/openidm/shutdown.shUser=fr SuccessExitStatus=143 [Install] * The only tricky thing above is the SuccessExitStatus. For reasons that I do not fully understand, many Java based programs started with shell scripts will use that system exit code.

Copy the above to /etc/systemd/system/openidm.service and you are good to go:

systemctl start openidm.service systemctl stop openidm.service systemctl sta…