Skip to content

Instantly share code, notes, and snippets.

@Morgul
Created November 21, 2013 14:36
Show Gist options
  • Save Morgul/7582598 to your computer and use it in GitHub Desktop.
Save Morgul/7582598 to your computer and use it in GitHub Desktop.
A small upstart script I can use as a template. Edit it, and put it in /etc/init.
#!upstart
description "My Application's description here."
author "Chris Case <chris.case@g33xnexus.com>"
# Depending on what this is, you mat consider `start on started network-services`
start on startup
# May not need a stop on clause
stop on shutdown
respawn
# Should probably setuid to whatever _unprivledged_ user was setup to run this app, like `www-data`.
setuid root
script
cd /opt/docserver/dox-generator
exec npm start
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment