aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2018-05-08 16:15:14 +0800
committeryangyan <yangyanyj@chinamobile.com>2018-05-08 16:16:14 +0800
commit4bd5440837086210f979343267624d654538998d (patch)
treedf9e509c8dbc035faeb9ee960aea01a0bbada418 /docker
parent653a79016e7f97705640bd4bdbd9156b95b6b3d7 (diff)
Database reinitialization protection
Issue-ID: VFC-900 Change-Id: I33b2720070949d2371997dc8caeeecf1d369f821 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/instance_init.sh5
1 files changed, 4 insertions, 1 deletions
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
}