From 963b0928396d428eb3125a7f95b25e35fe7325b1 Mon Sep 17 00:00:00 2001 From: yangyan Date: Tue, 8 May 2018 17:28:49 +0800 Subject: Database reinitialization protection Issue-ID: VFC-900 Change-Id: I17b83165f2f497016bc46289c15f75554f9a0437 Signed-off-by: yangyan --- docker/instance_init.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 } -- cgit 1.2.3-korg