Fix supermaster (#26)

This commit is contained in:
Elias Ojala 2019-09-28 21:25:03 +00:00 committed by Peter Schiffer
parent 5cff672659
commit 1bca547770
2 changed files with 2 additions and 1 deletions

View file

@ -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

View file

@ -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