diff --git a/README.md b/README.md index 485c718..5b57a71 100644 --- a/README.md +++ b/README.md @@ -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:** diff --git a/entrypoint.sh b/entrypoint.sh index 40f5184..9381d2f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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"