diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-04-12 17:12:16 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-04-12 17:12:16 +0800 |
commit | f0fad857a0045f3f14f36ecdc6b294b1b27df6c4 (patch) | |
tree | 35c060451972e1d6380e5545e25954aa03d7ad2a /lcm/docker/instance_config.sh | |
parent | d43897cd3592361fa0d22fbe05250949eb279dd1 (diff) |
Fix docker config scripts of vfc
Change-Id: Ibab477d5c2a3ae93b15525777180bd011392537f
Issue-ID: VFC-874
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'lcm/docker/instance_config.sh')
-rwxr-xr-x | lcm/docker/instance_config.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lcm/docker/instance_config.sh b/lcm/docker/instance_config.sh index 381f462a..c15cb848 100755 --- a/lcm/docker/instance_config.sh +++ b/lcm/docker/instance_config.sh @@ -3,11 +3,18 @@ MSB_IP=`echo $MSB_ADDR | cut -d: -f 1` MSB_PORT=`echo $MSB_ADDR | cut -d: -f 2` -sed -i "s|MSB_SERVICE_IP.*|MSB_SERVICE_IP = '$MSB_IP'|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py -sed -i "s|MSB_SERVICE_PORT.*|MSB_SERVICE_PORT = '$MSB_PORT'|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py +if [ $MSB_IP ]; then + sed -i "s|MSB_SERVICE_IP.*|MSB_SERVICE_IP = '$MSB_IP'|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py +fi + +if [ $MSB_PORT ]; then + sed -i "s|MSB_SERVICE_PORT.*|MSB_SERVICE_PORT = '$MSB_PORT'|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py +fi + sed -i "s|DB_NAME.*|DB_NAME = 'gvnfm'|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py sed -i "s|DB_USER.*|DB_USER = 'gvnfm'|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py sed -i "s|DB_PASSWD.*|DB_PASSWD = 'gvnfm'|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py + if [ $SERVICE_IP ]; then sed -i "s|\"ip\": \".*\"|\"ip\": \"$SERVICE_IP\"|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py fi |