Created
March 5, 2012 15:44
-
-
Save swinton/1978897 to your computer and use it in GitHub Desktop.
Example of an upstart job running a python script under a virtualenv
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
######################################## | |
##### upstart_virtualenv_test.conf ##### | |
##### install in /etc/init ##### | |
######################################## | |
description "Testing virtualenv and upstart setup" | |
env PYTHON_HOME=/home/steve/.virtualenvs/upstart-test | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
exec $PYTHON_HOME/bin/python /usr/local/bin/upstart_virtualenv_test.py >> /var/log/upstart_virtualenv_test/upstart_virtualenv_test.log 2>&1 | |
respawn | |
respawn limit 10 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment