diff options
author | Harry Huang <huangxiangyu5@huawei.com> | 2017-11-21 16:43:42 +0800 |
---|---|---|
committer | Harry Huang <huangxiangyu5@huawei.com> | 2017-11-21 16:43:42 +0800 |
commit | 38716014a1df9aee4b6219994819708852f5d974 (patch) | |
tree | cbe61e67c808ffa029652fd6b00009cf6392d629 | |
parent | cdbfdcb04670bba08b301789c6be08900da44f10 (diff) |
Solve compass-db restart issue
JIRA: COMPASS-569
Add condition check in entrypoint.sh so
init part of mysql only be executed once
Change-Id: I1abfac0845847a6989beae6209881f415b4254b2
Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
-rw-r--r-- | compass-db/entrypoint.sh | 7 |
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 |