impressed by the ease of creating Upstart jobs

2014-10-30

At work, we run our systems on Ubuntu, which so far means the init system is Upstart. I needed to have one binary to start when the system boots, and because I'm horrified by sysvinit scripts (which Upstart supports), I decided to give creating an Upstart job a try. I was surprised how easy it was:

exec /usr/local/bin/executable
start on startup
respawn

I placed a file with above contents in /etc/init/executable.conf, and that's pretty much it. Impressive.

Here's what happens:

One convenient thing that's happening is that stdout output of the service gets re-directed to a log file, in this case /var/log/upstart/executable.log. Cool stuff.

I found help from Getting Started and the Cookbook.