mirror of
https://github.com/pschiffe/docker-pdns.git
synced 2025-01-18 19:11:14 +01:00
Fix supermaster (#26)
This commit is contained in:
parent
5cff672659
commit
1bca547770
2 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ RUN sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf \
|
||||||
pdns \
|
pdns \
|
||||||
pdns-backend-mysql \
|
pdns-backend-mysql \
|
||||||
mariadb \
|
mariadb \
|
||||||
|
hostname \
|
||||||
&& dnf clean all
|
&& dnf clean all
|
||||||
|
|
||||||
RUN pip3 install --no-cache-dir envtpl
|
RUN pip3 install --no-cache-dir envtpl
|
||||||
|
|
|
@ -38,7 +38,7 @@ if [ "${SUPERMASTER_IPS:-}" ]; then
|
||||||
$MYSQL_COMMAND -D "$PDNS_gmysql_dbname" -e "TRUNCATE supermasters;"
|
$MYSQL_COMMAND -D "$PDNS_gmysql_dbname" -e "TRUNCATE supermasters;"
|
||||||
MYSQL_INSERT_SUPERMASTERS=''
|
MYSQL_INSERT_SUPERMASTERS=''
|
||||||
for i in $SUPERMASTER_IPS; do
|
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
|
done
|
||||||
$MYSQL_COMMAND -D "$PDNS_gmysql_dbname" -e "$MYSQL_INSERT_SUPERMASTERS"
|
$MYSQL_COMMAND -D "$PDNS_gmysql_dbname" -e "$MYSQL_INSERT_SUPERMASTERS"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue