diff options
author | yangyan <yangyanyj@chinamobile.com> | 2019-04-03 10:55:35 +0800 |
---|---|---|
committer | Yan Yang <yangyanyj@chinamobile.com> | 2019-04-03 03:52:42 +0000 |
commit | 6e702cc6d82cfcaf79735ec2840cf294458bbb92 (patch) | |
tree | 0fd04ed455838b931911cde35b84882d72974e84 /docker | |
parent | beedfac1cf7e7c0ad5d127dcdd32b779a214c950 (diff) |
fix database bug
Change-Id: Id4c1149ee3d1d348abe02cd92324499e4158201b
Issue-ID: VFC-1334
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'docker')
-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 |