From a8f1131fb60608e0ba687a1ec6ce256f38c07d2d Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Thu, 12 Oct 2017 16:44:12 +0800 Subject: Enable specifying the Host IP using Script Change-Id: I5e2564d3c23c5bb0b30bad2b0cdede9c83694956 Issue-ID: HOLMES-73 Signed-off-by: Guangrong Fu --- engine-d-standalone/src/main/assembly/bin/run.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engine-d-standalone') diff --git a/engine-d-standalone/src/main/assembly/bin/run.sh b/engine-d-standalone/src/main/assembly/bin/run.sh index c48bc57..4d8dff5 100644 --- a/engine-d-standalone/src/main/assembly/bin/run.sh +++ b/engine-d-standalone/src/main/assembly/bin/run.sh @@ -43,8 +43,12 @@ sed -i "s|url:.*|url: jdbc:postgresql://$URL_JDBC/holmes|" "$main_path/conf/engi export SERVICE_IP=`hostname -i` echo SERVICE_IP=${SERVICE_IP} -if [ ${TESTING}==1 ]; then - export HOSTNAME=${SERVICE_IP}:9102 +if [ ! -z ${TESTING} ] && [ ${TESTING} == 1 ]; then + if [ ! -z ${HOST_IP}]; then + export HOSTNAME=${HOST_IP}:9102 + else + export HOSTNAME=${SERVICE_IP}:9102 + fi fi #ActiveMQ IP Configurations -- cgit 1.2.3-korg