|
@ -23,6 +23,15 @@ DJANGO_WSGI_MODULE=sapl.wsgi # WSGI module name (*) |
|
|
|
|
|
|
|
|
echo "Starting $NAME as `whoami` on base dir $SAPL_DIR" |
|
|
echo "Starting $NAME as `whoami` on base dir $SAPL_DIR" |
|
|
|
|
|
|
|
|
|
|
|
# parameter can be passed to run without virtualenv |
|
|
|
|
|
if [[ "$@" != "no-venv" ]]; then |
|
|
|
|
|
# Activate the virtual environment |
|
|
|
|
|
cd $DJANGODIR |
|
|
|
|
|
source /var/interlegis/.virtualenvs/sapl/bin/activate |
|
|
|
|
|
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE |
|
|
|
|
|
export PYTHONPATH=$DJANGODIR:$PYTHONPATH |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
# Create the run directory if it doesn't exist |
|
|
# Create the run directory if it doesn't exist |
|
|
RUNDIR=$(dirname $SOCKFILE) |
|
|
RUNDIR=$(dirname $SOCKFILE) |
|
|
test -d $RUNDIR || mkdir -p $RUNDIR |
|
|
test -d $RUNDIR || mkdir -p $RUNDIR |
|
|