Skip to content

Commit

Permalink
Rename functions for starting and stopping server
Browse files Browse the repository at this point in the history
  • Loading branch information
ltangvald authored and yosifkit committed Sep 18, 2019
1 parent f1abc95 commit 915c792
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .template.Debian/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ mysql_get_config() {
}

# Do a temporary startup of the MySQL server, for init purposes
docker_start_server() {
docker_temp_server_start() {
result=0
%%SERVERSTARTUP%%
if [ "$result" != "0" ];then
Expand All @@ -116,7 +116,7 @@ docker_wait_for_server() {

# Stop the server. When using a local socket file mysqladmin will block until
# the shutdown is complete.
docker_stop_server() {
docker_temp_server_stop() {
result=0
mysqladmin --defaults-extra-file="${PASSFILE}" shutdown -uroot --socket="${SOCKET}" || result=$?
if [ "$result" != "0" ]; then
Expand Down Expand Up @@ -277,7 +277,7 @@ _main() {
docker_init_client_command

mysql_note "Starting temporary server"
docker_start_server "$@"
docker_temp_server_start "$@"
# For 5.7+ the server is ready for use as soon as startup command unblocks
if [ "${MYSQL_MAJOR}" = "5.5" ] || [ "${MYSQL_MAJOR}" = "5.6" ]; then
mysql_note "Waiting for server startup"
Expand Down Expand Up @@ -309,7 +309,7 @@ _main() {
docker_expire_root_user
fi
mysql_note "Stopping temporary server"
docker_stop_server
docker_temp_server_stop
mysql_note "Temporary server stopped"

# Remove the password file now that initialization is complete
Expand Down

0 comments on commit 915c792

Please sign in to comment.