description "This is an upstart job file for TorqueBox"

pre-start script
  mkdir -p /var/log/torquebox
  chown -R torquebox /var/log/torquebox
end script

start on runlevel [2345]
stop on runlevel [!2345]
respawn

script
  sudo -i -u torquebox
  torquebox run >> /var/log/torquebox/torquebox.log 2>&1
end script

Add a code snippet to your website: www.paste.org