Skip to content

Instantly share code, notes, and snippets.

@skyler
Forked from parente/runinenv.sh
Created April 11, 2014 15:56

Revisions

  1. skyler revised this gist Apr 11, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion runinenv.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    #!/bin/bash
    # https://gist.github.com/826961
    # modified from https://gist.github.com/826961
    VENV=$1
    PROGNAME=$0
    if [ -z $VENV ]; then
  2. skyler revised this gist Apr 11, 2014. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions runinenv.sh
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,13 @@
    #!/bin/bash
    # https://gist.github.com/826961
    VENV=$1
    PROGNAME=$0
    if [ -z $VENV ]; then
    echo "usage: runinenv [virtualenv_path] CMDS"
    echo "usage: $PROGNAME [virtualenv_path] CMDS"
    exit 1
    fi
    . ${VENV}/bin/activate
    shift 1
    echo "Executing $@ in ${VENV}"
    exec "$@"
    deactivate
    deactivate
  3. @parente parente revised this gist Feb 15, 2011. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions supervisord.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    ; rest of conf omitted for brevity
    [program:handlerbag]
    command=sh runinenv /opt/envs/handlerbag handlerbag.py --port=5000
    directory=/opt/envs/handlerbag
  4. @parente parente created this gist Feb 15, 2011.
    11 changes: 11 additions & 0 deletions runinenv.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/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