Allow to override the --bind option to gunicorn

This commit is contained in:
Benjamin Dauvergne 2014-09-19 16:15:28 +02:00
parent 6c42b8ac0c
commit dea4e97759
1 changed files with 13 additions and 13 deletions

26
init.d
View File

@ -20,29 +20,29 @@ PIDFILE=$RUN_DIR/$NAME.pid
LOG_DIR=/var/log/$NAME
SCRIPTNAME=/etc/init.d/$NAME
MANAGE_SCRIPT=/usr/lib/$NAME/manage.py
SOCKFILE=$RUN_DIR/$NAME.sock
BIND=unix:$RUN_DIR/$NAME.sock
USER=$NAME
GROUP=$NAME
DAEMON_ARGS="--pid $PIDFILE \
--user $USER --group $GROUP \
--daemon \
--access-logfile $LOG_DIR/gunicorn-access.log \
--log-file $LOG_DIR/gunicorn-error.log \
--bind=unix:$SOCKFILE \
--workers=10 \
--worker-class=sync \
--timeout=60 \
--name $NAME \
passerelle.wsgi:application"
# Exit if the package is not installed
[ -x $DAEMON ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
DAEMON_ARGS=${DAEMON_ARGS:-"--pid $PIDFILE \
--user $USER --group $GROUP \
--daemon \
--access-logfile $LOG_DIR/gunicorn-access.log \
--log-file $LOG_DIR/gunicorn-error.log \
--bind=$BIND \
--workers=10 \
--worker-class=sync \
--timeout=60 \
--name $NAME \
passerelle.wsgi:application"}
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh