Upstart! As you're using Ubuntu 12.04..
You create an upstart script in
Your script contains directives, which control the process, how it runs, where it runs, environment, respawn if fail, etc.
# my upstart script
# optional stuff
description "start and stop the THING"
# configuration variables.
# You'll want to change these as needed
# tell upstart we're creating a daemon
# upstart manages PID creation for you.
# of course, if it doesn't fork, take out the above line
# My startup script, plain old shell scripting here.
exec /opt/thingy/bin/thingy ARGUMENTS
# create a custom event in case we want to chain later
Taken and adapted from: http://geeknme.wordpress.com/2009/10/15/getting-started-with-upstart-in-ubuntu/
I also recommend you read the Upstart Cookbook
If you're not using Ubuntu, then other options include supervisor(d), monit, daemontools
all of which suck far less than running stuff in screen or with nohup.