-
-
Save akhy/a54f8a3a98d843d7ee0e0f89aa466638 to your computer and use it in GitHub Desktop.
run a command in virtualenv, useful for supervisord
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 | |
VENV=$1 | |
if [ -z $VENV ]; then | |
echo "usage: runinenv [virtualenv_path] CMDS" | |
exit 1 | |
fi | |
. ${VENV}/bin/activate | |
shift 1 | |
echo "Executing $@ in ${VENV}" | |
exec "$@" | |
deactivate |
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
; rest of conf omitted for brevity | |
[program:handlerbag] | |
command=sh runinenv /opt/envs/handlerbag handlerbag.py --port=5000 | |
directory=/opt/envs/handlerbag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment