Ubuntu Upstart script for SequenceServer?

I host sequenceserver for a class I teach, and I want my server to be more or less low maintenance - meaning I want sequenceserver to automatically start up if the machine ever gets power cycled. I spent quite a lot of time getting rc-local configured and it really is archaic - and being replaced by the new ubuntu service called Upstart. I’ve tried writing some Upstart scripts to get sequenceserver to start up automatically, to no avail. Has anyone else tried this?

And I solved my own problem. Here’s how to automate sequenceserver startup on ubuntu:

  1. Create a text file called sequenceserver.conf in /etc/init/

  2. Edit the text file so that it contains the following:

description “start and stop the sequenceserver server”

exec /bin/sh -c ‘sequenceserver --config /home/wolfgang/.sequenceserver.conf’

start on runlevel [2345]
stop on runlevel [^2345]

respawn
respawn limit 20 5

  1. in the command line type sudo initctl reload-configurationi

  2. in the command line type sudo start sequenceserver

And you’re done! Now on shutdown sequenceserver will shut down, and on start up it will start up - no more manually managing.

Great, thanks for sharing Wolfgang.