dns/bind: fix template generation (#1469)

This commit is contained in:
Michael
2019-08-28 10:16:36 +02:00
committed by Franco Fichtner
parent 97f1da92c9
commit e134d7dce8
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= bind
PLUGIN_VERSION= 1.7
PLUGIN_VERSION= 1.8
PLUGIN_COMMENT= BIND domain name service
PLUGIN_DEPENDS= bind914
PLUGIN_MAINTAINER= m.muenz@gmail.com
+4
View File
@@ -8,6 +8,10 @@ necessary for asking and answering name service questions.
Plugin Changelog
================
1.8
* Fix template generation when there is only one zone configured
1.7
* Rename "domain" to "zone", because both forward and reverse zones can be used[1]
@@ -1,7 +1,7 @@
{% if helpers.exists('OPNsense.bind.general.enabled') and OPNsense.bind.general.enabled == '1' %}
{% if helpers.exists('OPNsense.bind.domain.domains.domain') %}
{% for domaindb in helpers.toList('OPNsense.bind.domain.domains.domain') %}
{% if TARGET_FILTERS['OPNsense.bind.domain.domains.domain.' ~ loop.index0] %}
{% if TARGET_FILTERS['OPNsense.bind.domain.domains.domain.' ~ loop.index0] or TARGET_FILTERS['OPNsense.bind.domain.domains.domain'] %}
{% if domaindb.enabled == '1' and domaindb.type == 'master' %}
$TTL {{ domaindb.ttl }}
@ IN SOA {{ domaindb.dnsserver }}. {{ domaindb.mailadmin|replace('@', '.') }}. ( {{ domaindb.serial|trim }} {{ domaindb.refresh }} {{ domaindb.retry }} {{ domaindb.expire }} {{ domaindb.negative }} )