Skip to content

Instantly share code, notes, and snippets.

@dustin
Created January 6, 2009 05:44
Show Gist options
  • Save dustin/43692 to your computer and use it in GitHub Desktop.
Save dustin/43692 to your computer and use it in GitHub Desktop.
Sample upstart script for a twisted project.
# This is a sample script for upstart to keep a twisted project running.
# Place it in /etc/event.d/[projectname]
description "useful description"
author "Dustin Sallings <dustin@spy.net>"
start on runlevel 2
start on runlevel 3
stop on runlevel 0
stop on runlevel 1
stop on runlevel 4
stop on runlevel 5
stop on runlevel 6
chdir /path/to/project/directory
exec /usr/bin/twistd --uid=daemonuser --syslog -ny project.tac
respawn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment