From 99ece2ffa06192da5534fc1d852c6cc89e719052 Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Mon, 9 Jul 2018 10:58:06 -0300 Subject: [PATCH] Updated PowerDNS to Debian Stretch and version 4.1.3 --- pdns/Dockerfile | 5 +++-- pdns/pdns.list | 2 +- pdns/secallzones.sh | 6 ++++++ pdns/start.sh | 6 +----- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/pdns/Dockerfile b/pdns/Dockerfile index 27a8b26..f5ac269 100644 --- a/pdns/Dockerfile +++ b/pdns/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:jessie +FROM debian:stretch-slim + MAINTAINER Fabio Rauber ENV PDNSCONF_LAUNCH="gmysql" \ @@ -14,7 +15,7 @@ ENV PDNSCONF_LAUNCH="gmysql" \ ADD pdns.list /etc/apt/sources.list.d/pdns.list ADD pdns.preference /etc/apt/preferences.d/pdns -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y curl && \ +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y curl gnupg && \ curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add - && apt-get update RUN DEBIAN_FRONTEND=noninteractive apt-get install -q -y pdns-server pdns-backend-mysql mysql-client && \ diff --git a/pdns/pdns.list b/pdns/pdns.list index 8b18d98..b33303a 100644 --- a/pdns/pdns.list +++ b/pdns/pdns.list @@ -1 +1 @@ -deb http://repo.powerdns.com/debian jessie-auth-40 main +deb [arch=amd64] http://repo.powerdns.com/debian stretch-auth-41 main diff --git a/pdns/secallzones.sh b/pdns/secallzones.sh index 0cb4efa..e5de2ce 100755 --- a/pdns/secallzones.sh +++ b/pdns/secallzones.sh @@ -21,4 +21,10 @@ while read -r d; do fi done <<< "$ZONES" + +echo -n "[`date +"%T"`] Rectifying all zones..." +pdnsutil rectify-all-zones &> /dev/null && echo " OK." + echo "[`date +"%T"`] Secallzones finished." + + diff --git a/pdns/start.sh b/pdns/start.sh index b6c6bbd..57c48ab 100644 --- a/pdns/start.sh +++ b/pdns/start.sh @@ -19,11 +19,7 @@ fi for var in $PDNSVARS; do varname=`echo ${var#"PDNSCONF_"} | awk '{print tolower($0)}' | sed 's/_/-/g'` value=`echo ${!var} | sed 's/^$\(.*\)/\1/'` - if [ ! -z ${!value} ]; then - echo "$varname=${!value}" >> /etc/powerdns/pdns.conf - else - echo "$varname=$value" >> /etc/powerdns/pdns.conf - fi + echo "$varname=$value" >> /etc/powerdns/pdns.conf done if [ ! -z $PDNSCONF_API_KEY ]; then