Skip to content

Instantly share code, notes, and snippets.

@skyler
Forked from parente/runinenv.sh
Created April 11, 2014 15:56
Show Gist options
  • Save skyler/10479867 to your computer and use it in GitHub Desktop.
Save skyler/10479867 to your computer and use it in GitHub Desktop.
#!/bin/bash
# modified from https://gist.github.com/826961
VENV=$1
PROGNAME=$0
if [ -z $VENV ]; then
echo "usage: $PROGNAME [virtualenv_path] CMDS"
exit 1
fi
. ${VENV}/bin/activate
shift 1
echo "Executing $@ in ${VENV}"
exec "$@"
deactivate
; 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