From 9f78110e26aa8e3eec7946fddaef46a0d957f565 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 16 Sep 2014 11:51:29 +0200 Subject: [PATCH] Rename PID_DIR to RUN_DIR to uniformize with other packages --- debian/portail-citoyen2.init | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/debian/portail-citoyen2.init b/debian/portail-citoyen2.init index 9da7928..f03b0a9 100644 --- a/debian/portail-citoyen2.init +++ b/debian/portail-citoyen2.init @@ -15,10 +15,11 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC=portail-citoyen NAME=portail-citoyen DAEMON=/usr/bin/gunicorn -PID_DIR=/var/run/$NAME +RUN_DIR=/var/run/$NAME LOG_DIR=/var/log/$NAME -PIDFILE=$PID_DIR/$NAME.pid +PIDFILE=$RUN_DIR/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME +SOCKFILE=$RUN_DIR/$NAME.sock USER=portail-citoyen GROUP=portail-citoyen @@ -28,7 +29,7 @@ DAEMON_ARGS="--pid $PIDFILE \ --daemon \ --access-logfile $LOG_DIR/gunicorn-access.log \ --log-file $LOG_DIR/gunicorn-error.log \ ---bind=unix:$PID_DIR/$NAME.sock \ +--bind=unix:$SOCKFILE --workers=10 \ --worker-class=sync \ --timeout=60 \ @@ -50,9 +51,9 @@ portail_citoyen2.wsgi:application" # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions -# Create pid directory -if [ ! -d $PID_DIR ]; then - install -d -m 755 -o $USER -g $GROUP $PID_DIR +# Create /run directory +if [ ! -d $RUN_DIR ]; then + install -d -m 755 -o $USER -g $GROUP $RUN_DIR fi #