aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2018-02-20 14:42:49 -0500
committerLusheng Ji <lji@research.att.com>2018-02-20 14:42:56 -0500
commit438257ad8f86b742935f2f44eaa6a6eb077d9336 (patch)
tree4af0f4541c0a15ed830927a572f22011f4098bdf /src
parent06432142579c09ac49443f4bf7c6d72d61afb974 (diff)
Change default DMaaP hostname
The changes are for the purpose of allowing DMAAPHOST environmental variable to accept either hostname and IP address. If it is IP address, the resolution for default dmaap hostname is written to /etc/hosts; if hostname,an alias is created in /etc/host.aliases for the default dmaap hostname. (for the hostname aliasing to work, chnage default dmaap hostname to onap-dmaap, no domain). Change-Id: I58583cc5b678a29b54d8baecbd0b7bec621f7c8f Signed-off-by: Lusheng Ji <lji@research.att.com> Issue-ID: DCAEGEN2-235
Diffstat (limited to 'src')
-rw-r--r--src/main/scripts/docker-entry.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/scripts/docker-entry.sh b/src/main/scripts/docker-entry.sh
index 26dcb896..3b73005f 100644
--- a/src/main/scripts/docker-entry.sh
+++ b/src/main/scripts/docker-entry.sh
@@ -24,7 +24,11 @@ if [ ! -z "$COLLECTOR_IP" ]; then
fi
if [ ! -z "$DMAAPHOST" ]; then
- echo $DMAAPHOST onap.dmaap.org >> /etc/hosts
+ if [ -z "$(echo $DMAAPHOST | sed -e 's/[0-9\.]//g')" ]; then
+ echo "$DMAAPHOST onap-dmaap" >> /etc/hosts
+ else
+ echo "onap-dmaap $DMAAPHOST" >> /etc/host.aliases
+ fi
else
echo "DMAAPHOST ENV NOT SET!! PUBLISH WILL NOT BE SUPPORTED"
fi