diff options
author | yangyan <yangyanyj@chinamobile.com> | 2018-05-08 17:28:49 +0800 |
---|---|---|
committer | yangyan <yangyanyj@chinamobile.com> | 2018-05-08 17:28:54 +0800 |
commit | 963b0928396d428eb3125a7f95b25e35fe7325b1 (patch) | |
tree | 61472440c1b4549e23a01170e145957bb9ce7993 | |
parent | b4bf83ebe222b304b2cd6afc52b020773a79899d (diff) |
Database reinitialization protection
Issue-ID: VFC-900
Change-Id: I17b83165f2f497016bc46289c15f75554f9a0437
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rwxr-xr-x | docker/instance_init.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docker/instance_init.sh b/docker/instance_init.sh index 622477fc..c2401144 100755 --- a/docker/instance_init.sh +++ b/docker/instance_init.sh @@ -16,7 +16,10 @@ function start_mysql { function create_database { cd /service/vfc/nfvo/catalog/resources/bin - bash initDB.sh root $MYSQL_ROOT_PASSWORD 3306 127.0.0.1 + if [ ! -f dbexist.txt ]; then + echo 1 > dbexist.txt + bash initDB.sh root $MYSQL_ROOT_PASSWORD 3306 127.0.0.1 + fi cd /service } |