Skip to content

Instantly share code, notes, and snippets.

@netmarkjp
Created September 7, 2013 02:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save netmarkjp/6472307 to your computer and use it in GitHub Desktop.
Save netmarkjp/6472307 to your computer and use it in GitHub Desktop.
wapper for supervisord + gunicorn/celery with virtualenv
#!/bin/sh
# from http://d.hatena.ne.jp/heavenshell/20121122/1353597292
VENV=$1
echo $VENV
if [ -z $VENV ]; then
echo "usage: runinenv [virtualenv_path] CMDS"
exit 1
fi
. ${VENV}/bin/activate
shift 1
echo "Executing $@ in ${VENV}"
exec "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment