Add MYSQL_ENV_MYSQL_HOST and MYSQL_ENV_MYSQL_PORT variables

This commit is contained in:
Peter Schiffer 2018-11-22 19:06:34 +01:00
parent d8214ebc7d
commit 338d106d67
No known key found for this signature in database
GPG key ID: 6CCC5046E2B0B44B
2 changed files with 4 additions and 4 deletions

View file

@ -3,8 +3,8 @@
set -euo pipefail
# Configure mysql env vars
: "${PDNS_ADMIN_SQLA_DB_HOST:='mysql'}"
: "${PDNS_ADMIN_SQLA_DB_PORT:='3306'}"
: "${PDNS_ADMIN_SQLA_DB_HOST:='${MYSQL_ENV_MYSQL_HOST:-mysql}'}"
: "${PDNS_ADMIN_SQLA_DB_PORT:='${MYSQL_ENV_MYSQL_PORT:-3306}'}"
: "${PDNS_ADMIN_SQLA_DB_USER:='${MYSQL_ENV_MYSQL_USER:-root}'}"
if [ "${PDNS_ADMIN_SQLA_DB_USER}" = "'root'" ]; then
: "${PDNS_ADMIN_SQLA_DB_PASSWORD:='$MYSQL_ENV_MYSQL_ROOT_PASSWORD'}"

View file

@ -3,8 +3,8 @@
set -euo pipefail
# Configure mysql env vars
: "${PDNS_gmysql_host:=mysql}"
: "${PDNS_gmysql_port:=3306}"
: "${PDNS_gmysql_host:=${MYSQL_ENV_MYSQL_HOST:-mysql}}"
: "${PDNS_gmysql_port:=${MYSQL_ENV_MYSQL_PORT:-3306}}"
: "${PDNS_gmysql_user:=${MYSQL_ENV_MYSQL_USER:-root}}"
if [ "${PDNS_gmysql_user}" = 'root' ]; then
: "${PDNS_gmysql_password:=$MYSQL_ENV_MYSQL_ROOT_PASSWORD}"