mirror of
https://github.com/pschiffe/docker-pdns.git
synced 2025-01-18 11:01:14 +01:00
Add MYSQL_CLIENT_EXTRA_PARAMS env var
Some checks failed
Docker Image CI / build-recursor-latest (push) Has been cancelled
Docker Image CI / build-recursor-alpine (push) Has been cancelled
Docker Image CI / build-pdns-mysql-latest (push) Has been cancelled
Docker Image CI / build-pdns-mysql-alpine (push) Has been cancelled
Docker Image CI / build-pdns-pgsql-latest (push) Has been cancelled
Docker Image CI / build-pdns-pgsql-alpine (push) Has been cancelled
Docker Image CI / build-pdns-admin (push) Has been cancelled
Some checks failed
Docker Image CI / build-recursor-latest (push) Has been cancelled
Docker Image CI / build-recursor-alpine (push) Has been cancelled
Docker Image CI / build-pdns-mysql-latest (push) Has been cancelled
Docker Image CI / build-pdns-mysql-alpine (push) Has been cancelled
Docker Image CI / build-pdns-pgsql-latest (push) Has been cancelled
Docker Image CI / build-pdns-pgsql-alpine (push) Has been cancelled
Docker Image CI / build-pdns-admin (push) Has been cancelled
So it's possible to set custom parameters for mysql client program. Fixes #147
This commit is contained in:
parent
9618517672
commit
74db3e6639
1 changed files with 5 additions and 5 deletions
|
@ -38,20 +38,20 @@ deriveMySQLSettingsFromEnvironment() {
|
|||
}
|
||||
|
||||
generateMySQLCommand() {
|
||||
EXTRA=''
|
||||
: "${MYSQL_CLIENT_EXTRA_PARAMS:=}"
|
||||
|
||||
# Password Auth
|
||||
if [ "${PDNS_gmysql_password}" ]; then
|
||||
EXTRA="${EXTRA} -p${PDNS_gmysql_password}"
|
||||
if [ "${PDNS_gmysql_password:-}" ]; then
|
||||
MYSQL_CLIENT_EXTRA_PARAMS="${MYSQL_CLIENT_EXTRA_PARAMS} -p${PDNS_gmysql_password}"
|
||||
fi
|
||||
|
||||
# Allow socket connections
|
||||
if [ "${PDNS_gmysql_socket:-}" ]; then
|
||||
export PDNS_gmysql_host='localhost'
|
||||
EXTRA="${EXTRA} --socket=${PDNS_gmysql_socket}"
|
||||
MYSQL_CLIENT_EXTRA_PARAMS="${MYSQL_CLIENT_EXTRA_PARAMS} --socket=${PDNS_gmysql_socket}"
|
||||
fi
|
||||
|
||||
MYSQL_COMMAND="mariadb -h ${PDNS_gmysql_host} -P ${PDNS_gmysql_port} -u ${PDNS_gmysql_user}${EXTRA}"
|
||||
MYSQL_COMMAND="mariadb -h ${PDNS_gmysql_host} -P ${PDNS_gmysql_port} -u ${PDNS_gmysql_user} ${MYSQL_CLIENT_EXTRA_PARAMS}"
|
||||
}
|
||||
|
||||
createDatabaseIfRequested() {
|
||||
|
|
Loading…
Reference in a new issue