Merge pull request #30 from rfrenayworldstream/dnssec

Set gmysql-dnssec parameter (DNSSEC support)
This commit is contained in:
Christoph Wiechert 2019-10-21 11:51:21 +02:00 committed by GitHub
commit c581ad27f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@
* Small Alpine based Image
* MySQL (default), Postgres, SQLite and Bind backend included
* DNSSEC support optional
* Automatic MySQL database initialization
* Latest PowerDNS version (if not pls file an issue)
* Guardian process enabled
@ -48,7 +49,9 @@ $ docker run --name pdns \
* `MYSQL_USER=root`
* `MYSQL_PASS=root`
* `MYSQL_DB=pdns`
* `MYSQL_DNSSEC=no`
* Want to disable mysql initialization? Use `MYSQL_AUTOCONF=false`
* DNSSEC is disabled by default, to enable use `MYSQL_DNSSEC=yes`
* Want to use own config files? Mount a Volume to `/etc/pdns/conf.d` or simply overwrite `/etc/pdns/pdns.conf`
**PowerDNS Configuration:**

View File

@ -10,12 +10,16 @@ if $MYSQL_AUTOCONF ; then
if [ -z "$MYSQL_PORT" ]; then
MYSQL_PORT=3306
fi
if [ -z "$MYSQL_DNSSEC" ]; then
MYSQL_DNSSEC='no'
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
sed -r -i "s/^[# ]*gmysql-user=.*/gmysql-user=${MYSQL_USER}/g" /etc/pdns/pdns.conf
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
sed -r -i "s/^[# ]*gmysql-dnssec=.*/gmysql-dnssec=${MYSQL_DNSSEC}/g" /etc/pdns/pdns.conf
MYSQLCMD="mysql --host=${MYSQL_HOST} --user=${MYSQL_USER} --password=${MYSQL_PASS} --port=${MYSQL_PORT} -r -N"