From b6d000ec268ace21e8e982ded1cb33ad7d785677 Mon Sep 17 00:00:00 2001 From: Andrew Pogrebennyk Date: Tue, 3 Jun 2014 15:21:52 +0200 Subject: [PATCH] MT#7275 switch NPROC for ngcp-panel to config.yml --- debian/ngcp-panel.default | 3 ++- debian/ngcp-panel.init | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/debian/ngcp-panel.default b/debian/ngcp-panel.default index 807b5f9146..232f109b49 100644 --- a/debian/ngcp-panel.default +++ b/debian/ngcp-panel.default @@ -1 +1,2 @@ -RUN_DAEMON="no" \ No newline at end of file +RUN_DAEMON="no" +NPROC=[% www_admin.fastcgi_workers %] diff --git a/debian/ngcp-panel.init b/debian/ngcp-panel.init index 4dc97c26b9..246271bf59 100644 --- a/debian/ngcp-panel.init +++ b/debian/ngcp-panel.init @@ -23,7 +23,12 @@ DESC="NGCP-Panel Webapp" DEFAULTS=/etc/default/$NAME USOCKET=$HOMERUN/ngcp-panel.sock LOGERR=/var/log/ngcp/ngcp-panel.log -NPROC=1 + +# Load startup options if available +if [ -f $DEFAULTS ]; then + . $DEFAULTS || true +fi +NPROC=${NPROC:-1} OPTIONS="--listen $USOCKET --daemon --pidfile $PIDFILE --nproc $NPROC" @@ -112,11 +117,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