From 2fcb086490233ff9e1b156d7296f54dba4b821e8 Mon Sep 17 00:00:00 2001 From: Lars Tangvald Date: Mon, 1 Apr 2019 10:37:49 +0200 Subject: [PATCH] Rename docker_file_env to file_env This function is not meant to be part of the public set --- .template.Debian/docker-entrypoint.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.template.Debian/docker-entrypoint.sh b/.template.Debian/docker-entrypoint.sh index 30adbfd6c..f087af868 100755 --- a/.template.Debian/docker-entrypoint.sh +++ b/.template.Debian/docker-entrypoint.sh @@ -34,11 +34,11 @@ for arg; do esac done -# usage: docker_file_env VAR [DEFAULT] -# ie: docker_file_env 'XYZ_DB_PASSWORD' 'example' +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' # (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of # "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -docker_file_env() { +file_env() { local var="$1" local fileVar="${var}_FILE" local def="${2:-}" @@ -158,11 +158,11 @@ docker_init_env() { PASSFILE="$(mktemp ${TMPDIR}/XXXXXXXXXX)" # Initialize values that might be stored in a file - docker_file_env 'MYSQL_ROOT_HOST' '%' - docker_file_env 'MYSQL_DATABASE' - docker_file_env 'MYSQL_USER' - docker_file_env 'MYSQL_PASSWORD' - docker_file_env 'MYSQL_ROOT_PASSWORD' + file_env 'MYSQL_ROOT_HOST' '%' + file_env 'MYSQL_DATABASE' + file_env 'MYSQL_USER' + file_env 'MYSQL_PASSWORD' + file_env 'MYSQL_ROOT_PASSWORD' } # Define the client command that's used in various places