From 38716014a1df9aee4b6219994819708852f5d974 Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Tue, 21 Nov 2017 16:43:42 +0800 Subject: 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 --- compass-db/entrypoint.sh | 7 ++++--- 1 file 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 -- cgit 1.2.3-korg