diff options
Diffstat (limited to 'docker/instance_init.sh')
-rwxr-xr-x | docker/instance_init.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docker/instance_init.sh b/docker/instance_init.sh index 6c289657..7e5fcf31 100755 --- a/docker/instance_init.sh +++ b/docker/instance_init.sh @@ -26,9 +26,9 @@ function migrate_database { } -cd /service -if [ ! -f dbexist.txt ]; then - echo 1 > dbexist.txt +GET_NSLCM_DB="show databases like 'vfcnfvolcm';" +NSLCM_DB=`mysql -u$MYSQL_ROOT_USER -p$MYSQL_ROOT_PASSWORD -P$MYSQL_PORT -h$MYSQL_IP -e "GET_NSLCM_DB"` +if [[ "$NSLCM_DB" == "" ]]; then create_database migrate_database fi |