From: yangyan Date: Tue, 8 May 2018 08:15:14 +0000 (+0800) Subject: Database reinitialization protection X-Git-Tag: v1.1.0~18 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=4bd5440837086210f979343267624d654538998d;p=vfc%2Fnfvo%2Flcm.git Database reinitialization protection Issue-ID: VFC-900 Change-Id: I33b2720070949d2371997dc8caeeecf1d369f821 Signed-off-by: yangyan --- diff --git a/docker/instance_init.sh b/docker/instance_init.sh index e8ee4bbc..daafcc26 100755 --- a/docker/instance_init.sh +++ b/docker/instance_init.sh @@ -11,7 +11,10 @@ function start_mysql { function create_database { cd /service/vfc/nfvo/lcm/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 }