Skip to content

Commit

Permalink
Rename docker_check_config to mysql_check_config
Browse files Browse the repository at this point in the history
This function is mysql-only
  • Loading branch information
ltangvald authored and yosifkit committed Sep 18, 2019
1 parent 9f77ea5 commit ef9caa9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .template.Debian/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ docker_process_init_file() {
echo
}

docker_check_config() {
mysql_check_config() {
toRun=( "$@" --verbose --help )
if ! errors="$("${toRun[@]}" 2>&1 >/dev/null)"; then
docker_error "mysqld failed while attempting to check config\n\tcommand was: ${toRun[*]}\n\t$errors"
Expand Down Expand Up @@ -260,15 +260,15 @@ docker_main() {

# If container is started as root user, restart as dedicated mysql user
if [ "$(id -u)" = '0' ]; then
docker_check_config "$@"
mysql_check_config "$@"
mkdir -p "$DATADIR"
chown -R mysql:mysql "$DATADIR"
docker_note "Switching to dedicated user 'mysql'"
exec gosu mysql "$BASH_SOURCE" "$@"
fi

# still need to check config, container may have started with --user
docker_check_config "$@"
mysql_check_config "$@"

# If this is true then there's no database, and it needs to be initialized
if [ ! -d "$DATADIR/mysql" ]; then
Expand Down

0 comments on commit ef9caa9

Please sign in to comment.