Upstart is a monumental improvement over the classical SysV mechanism for Unix/Linux process/daemon management. Still, it’s a somewhat manual process to create jobs. I’ve previously written about the Upstart library that provides the ability to start and stop jobs (using D-Bus), as well as build jobs.
However, the Upstart library also provides two command-line tools:
- upstart-create: Create Upstart jobs using reasonable defaults.
- upstart-reload: Send a signal to Upstart to reload jobs.
Of particular note is the first tool. It’ll take a couple of options, and write a new job file (in /etc/init). The example from the project website (which displays to the screen rather than write a job file):
$ upstart-create test-job /bin/sh -j -d "some description" -a "some author " description "some description" author "some author " exec /bin/sh start on runlevel  stop on runlevel  respawn