From 617699693e2e471cc6c97caa06f0ed0c9a7dda47 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Thu, 10 Nov 2016 21:48:36 +0530 Subject: [PATCH] Changing the JVM startup order, and adding trap for stoping the servers. --- modules/distribution/src/resources/bin/start-all.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/distribution/src/resources/bin/start-all.sh b/modules/distribution/src/resources/bin/start-all.sh index 21031a5e..06221100 100644 --- a/modules/distribution/src/resources/bin/start-all.sh +++ b/modules/distribution/src/resources/bin/start-all.sh @@ -34,11 +34,17 @@ PRGDIR=`dirname "$PRG"` # Only set CARBON_HOME if not already set [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` +if [ ! -z "$*" ]; then + exit; +else + trap "sh $CARBON_HOME/bin/stop-all.sh; exit;" SIGINT SIGTERM +fi sh "$CARBON_HOME/broker/bin/wso2server.sh" $* & sleep 10 -sh "$CARBON_HOME/analytics/bin/wso2server.sh" $* & -sleep 20 sh "$CARBON_HOME/core/bin/wso2server.sh" $* & +sleep 20 +sh "$CARBON_HOME/analytics/bin/wso2server.sh" $* & + if [ ! -z "$*" ]; then exit;