From 1bca5477706306e07d28708125041d9df160cdb7 Mon Sep 17 00:00:00 2001 From: Elias Ojala Date: Sat, 28 Sep 2019 21:25:03 +0000 Subject: [PATCH] Fix supermaster (#26) --- pdns/Dockerfile | 1 + pdns/docker-entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pdns/Dockerfile b/pdns/Dockerfile index 43289dc..66d6cfc 100644 --- a/pdns/Dockerfile +++ b/pdns/Dockerfile @@ -6,6 +6,7 @@ RUN sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf \ pdns \ pdns-backend-mysql \ mariadb \ + hostname \ && dnf clean all RUN pip3 install --no-cache-dir envtpl diff --git a/pdns/docker-entrypoint.sh b/pdns/docker-entrypoint.sh index 59e51c1..1c0104d 100755 --- a/pdns/docker-entrypoint.sh +++ b/pdns/docker-entrypoint.sh @@ -38,7 +38,7 @@ if [ "${SUPERMASTER_IPS:-}" ]; then $MYSQL_COMMAND -D "$PDNS_gmysql_dbname" -e "TRUNCATE supermasters;" MYSQL_INSERT_SUPERMASTERS='' for i in $SUPERMASTER_IPS; do - MYSQL_INSERT_SUPERMASTERS="${MYSQL_INSERT_SUPERMASTERS} INSERT INTO supermasters VALUES('${i}', '$(uname -n)', 'admin');" + MYSQL_INSERT_SUPERMASTERS="${MYSQL_INSERT_SUPERMASTERS} INSERT INTO supermasters VALUES('${i}', '$(hostname -f)', 'admin');" done $MYSQL_COMMAND -D "$PDNS_gmysql_dbname" -e "$MYSQL_INSERT_SUPERMASTERS" fi