summaryrefslogtreecommitdiffstats
path: root/compass-db/entrypoint.sh
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2017-12-12 03:59:55 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-12-12 03:59:55 +0000
commit6234176ae292a75dcda5520324cb7857d6105988 (patch)
tree5c567f54cf01762e8a1ae17d81a8bd646e1334a7 /compass-db/entrypoint.sh
parent35c7dd8a2a74f252d9ef60e696379353076063f8 (diff)
parent38716014a1df9aee4b6219994819708852f5d974 (diff)
Merge "Solve compass-db restart issue"
Diffstat (limited to 'compass-db/entrypoint.sh')
-rw-r--r--compass-db/entrypoint.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/compass-db/entrypoint.sh b/compass-db/entrypoint.sh
index e01d29c..f4d5d15 100644
--- a/compass-db/entrypoint.sh
+++ b/compass-db/entrypoint.sh
@@ -33,9 +33,10 @@ bind-address=0.0.0.0
EOF
}
-
-if [[ -z ${1} ]]; then
+if [ ! -f /etc/db_created ]; then
create_users_and_dbs
listen_on_all_interfaces
- /usr/bin/mysqld_safe
+ touch /etc/db_created
fi
+
+/usr/bin/mysqld_safe