summaryrefslogtreecommitdiffstats
path: root/lcm/docker
diff options
context:
space:
mode:
Diffstat (limited to 'lcm/docker')
-rwxr-xr-xlcm/docker/instance_init.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/lcm/docker/instance_init.sh b/lcm/docker/instance_init.sh
index e7951192..b2c82cbb 100755
--- a/lcm/docker/instance_init.sh
+++ b/lcm/docker/instance_init.sh
@@ -22,9 +22,9 @@ function migrate_database {
python manage.py migrate
}
-cd /service
-if [ ! -f dbexist.txt ]; then
- echo 1 > dbexist.txt
+GET_VNFM_DB="show databases like 'gvnfm';"
+VNFM_DB=`mysql -u$MYSQL_ROOT_USER -p$MYSQL_ROOT_PASSWORD -P$MYSQL_PORT -h$MYSQL_IP -e "$GET_VNFM_DB"`
+if [[ "$VNFM_DB" != "" ]]; then
create_database
migrate_database
fi