Merge pull request #20 from wmarbut/master

Add port configuration
This commit is contained in:
Christoph Wiechert 2018-11-26 23:55:36 +01:00 committed by GitHub
commit 2dc59d7669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,9 @@ set -e
[ "${1:0:2}" != "--" ] && exec "$@"
if $MYSQL_AUTOCONF ; then
if [ -z "$MYSQL_PORT" ]; then
MYSQL_PORT=3306
fi
# Set MySQL Credentials in pdns.conf
sed -r -i "s/^[# ]*gmysql-host=.*/gmysql-host=${MYSQL_HOST}/g" /etc/pdns/pdns.conf
sed -r -i "s/^[# ]*gmysql-port=.*/gmysql-port=${MYSQL_PORT}/g" /etc/pdns/pdns.conf
@ -14,7 +17,7 @@ if $MYSQL_AUTOCONF ; then
sed -r -i "s/^[# ]*gmysql-password=.*/gmysql-password=${MYSQL_PASS}/g" /etc/pdns/pdns.conf
sed -r -i "s/^[# ]*gmysql-dbname=.*/gmysql-dbname=${MYSQL_DB}/g" /etc/pdns/pdns.conf
MYSQLCMD="mysql --host=${MYSQL_HOST} --user=${MYSQL_USER} --password=${MYSQL_PASS} -r -N"
MYSQLCMD="mysql --host=${MYSQL_HOST} --user=${MYSQL_USER} --password=${MYSQL_PASS} --port=${MYSQL_PORT} -r -N"
# wait for Database come ready
isDBup () {