Add port configuration
This commit is contained in:
parent
6e0bca99b3
commit
2d386a13d2
@ -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 () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user