diff options
author | Guangrong Fu <fu.guangrong@zte.com.cn> | 2017-10-12 16:40:12 +0800 |
---|---|---|
committer | Guangrong Fu <fu.guangrong@zte.com.cn> | 2017-10-12 16:42:08 +0800 |
commit | 4ceea4cc47587be029567617366c56c5f52d9914 (patch) | |
tree | 1dc9ef8b5d81a22e616016eca1dff41d7675d672 /rulemgt-standalone/src/main/assembly/bin/run.sh | |
parent | f067dcfc723d4494d84311528b2370196d3691a6 (diff) |
Enable specifying the Host IP using Script
Change-Id: I4188d5d1158d40dfa256308faefe48cb2e1a42d6
Issue-ID: HOLMES-73
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'rulemgt-standalone/src/main/assembly/bin/run.sh')
-rw-r--r-- | rulemgt-standalone/src/main/assembly/bin/run.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rulemgt-standalone/src/main/assembly/bin/run.sh b/rulemgt-standalone/src/main/assembly/bin/run.sh index bad26c7..357c7c9 100644 --- a/rulemgt-standalone/src/main/assembly/bin/run.sh +++ b/rulemgt-standalone/src/main/assembly/bin/run.sh @@ -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 |