From 090f1cfb3b87bf89e67a6dac1783cbf1d335650e Mon Sep 17 00:00:00 2001 From: Andrew Pogrebennyk Date: Tue, 3 Jun 2014 15:39:34 +0200 Subject: [PATCH] MT#7275 ngcp-www-csc: switch NPROC for to config.yml (cherry picked from commit 1c74da07b828178a996595fd31ff4ca9a8566577) --- debian/ngcp-www-csc.default | 1 + debian/ngcp-www-csc.init | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/debian/ngcp-www-csc.default b/debian/ngcp-www-csc.default index ae949c8..112a64e 100644 --- a/debian/ngcp-www-csc.default +++ b/debian/ngcp-www-csc.default @@ -1 +1,2 @@ RUN_DAEMON="no" +NPROC=[% www_csc.fastcgi_workers %] diff --git a/debian/ngcp-www-csc.init b/debian/ngcp-www-csc.init index 4f0359d..227f8b3 100644 --- a/debian/ngcp-www-csc.init +++ b/debian/ngcp-www-csc.init @@ -22,7 +22,12 @@ DESC="NGCP-CSC Webapp" DEFAULTS=/etc/default/$NAME USOCKET=$HOMERUN/ngcp-www-csc.sock LOGERR=/var/log/ngcp/ngcp-www-csc.log -NPROC=5 + +# Load startup options if available +if [ -f $DEFAULTS ]; then + . $DEFAULTS || true +fi +NPROC=${NPROC:-5} OPTIONS="--listen $USOCKET --daemon --pidfile $PIDFILE --nproc $NPROC" @@ -82,11 +87,6 @@ _stop() { fi } -# Load startup options if available -if [ -f $DEFAULTS ]; then - . $DEFAULTS || true -fi - if [ "$RUN_DAEMON" != "yes" ]; then log_failure_msg "$NAME not yet configured. Edit /etc/default/$NAME first." log_end_msg 0