Last active
December 21, 2015 06:29
-
-
Save blorenz/6264545 to your computer and use it in GitHub Desktop.
Activating virtualenvs for use with supervisord example /etc/supervisord.conf: [program:PROJECT] command = /virtualenvs/virtualenv_cmd.sh /virtualenvs/VIRTUALENV python PROJECT/manage.py run_gunicorn -b 127.0.0.1:9920 -t 1200
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
#!/bin/bash | |
# Activating virtualenvs for use with supervisord example /etc/supervisord.conf: | |
# [program:PROJECT] | |
# command = /virtualenvs/virtualenv_cmd.sh /virtualenvs/VIRTUALENV python PROJECT/manage.py run_gunicorn -b | |
VIRTUAL_ENV=$1 | |
if [ -z $VIRTUAL_ENV ]; then | |
echo "usage: $0 </path/to/virtualenv> <cmds>" | |
exit 1 | |
fi | |
. $VIRTUAL_ENV/bin/activate | |
shift 1 | |
exec "$@" | |
deactivate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment