Allow overriding gunicorn bind
This commit is contained in:
parent
9fc7ab9e0e
commit
6bf6880d85
|
@ -20,23 +20,11 @@ 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 \
|
||||
portail_citoyen.wsgi:application"
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x $DAEMON ] || exit 0
|
||||
|
||||
|
@ -46,6 +34,19 @@ portail_citoyen.wsgi:application"
|
|||
# Load confg (legacy)
|
||||
. /etc/portail-citoyen/portail-citoyen2.conf
|
||||
|
||||
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 \
|
||||
portail_citoyen.wsgi:application"}
|
||||
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
|
|
Reference in New Issue