Enable specifying the Host IP using Script
[holmes/rule-management.git] / rulemgt-standalone / src / main / assembly / bin / run.sh
index bad26c7..357c7c9 100644 (file)
@@ -39,8 +39,12 @@ sed -i "s|msbServerAddr:.*|msbServerAddr: http://$MSB_ADDR|" "$main_path/conf/ru
 export SERVICE_IP=`hostname -i`
 echo SERVICE_IP=${SERVICE_IP}
 
-if [ ${TESTING}==1 ]; then
-    export HOSTNAME=${SERVICE_IP}:9101
+if [ ! -z ${TESTING} ] && [ ${TESTING} == 1 ]; then
+    if [ ! -z ${HOST_IP}]; then
+        export HOSTNAME=${HOST_IP}:9101
+    else
+        export HOSTNAME=${SERVICE_IP}:9101
+    fi
 fi