# 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 " 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