Created
January 6, 2009 05:44
-
-
Save dustin/43692 to your computer and use it in GitHub Desktop.
Sample upstart script for a twisted project.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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