update instance-init.sh 45/19845/1
authoryufei_zhou <yufei.zhou@nokia-sbell.com>
Fri, 20 Oct 2017 02:23:17 +0000 (10:23 +0800)
committeryufei_zhou <yufei.zhou@nokia-sbell.com>
Fri, 20 Oct 2017 02:23:17 +0000 (10:23 +0800)
Change-Id: Ida7423127ee2e6e00e57abf5268a1a8e37b183db
Issue-ID: VFC-544
Signed-off-by: yufei_zhou <yufei.zhou@nokia-sbell.com>
nokia/vnfmdriver/vfcadaptorservice/docker/instance-config.sh
nokia/vnfmdriver/vfcadaptorservice/docker/instance-init.sh

index 94f8d5b..1631cc5 100755 (executable)
 #
 # Config MSB address
 MSB_IP=`echo $MSB_ADDR | cut -d: -f 1`
-sed -i "s|127\.0\.0\.1|${MSB_IP}|" etc/conf/restclient.json
+MSB_PORT=`echo $MSB_ADDR | cut -d: -f 2`
+
+if [ $MSB_PORT ]; then
+  sed -i "s|127\.0\.0\.1|${MSB_IP}|" etc/conf/restclient.json
+fi
+
+if [ $MSB_PORT ]; then
+  sed -i "s|80|${$MSB_PORT}|" etc/conf/restclient.json
+fi
+
 cat etc/conf/restclient.json
 
 # Set self IP
index 69e2b25..39f0c3e 100755 (executable)
@@ -18,7 +18,7 @@
 
 function start_mysql {
     echo "start mysql ... "
-    service mysql start
+    /usr/bin/systemctl start mysql.service || /usr/sbin/service mysql start
     sleep 1
 }