[fix] substitute variables AFTER mysql queries in bind zone file

This commit is contained in:
Benjamin Sonntag 2018-07-17 17:28:14 +02:00
parent 5c32a54edb
commit 3bc65aed3f
1 changed files with 4 additions and 3 deletions

View File

@ -72,6 +72,10 @@ class m_bind {
// Prepare a new zonefile from a template
$zone = file_get_contents($this->ZONE_TEMPLATE);
// add the SUBDOMAIN entries
$zone .= $this->conf_from_db($domain);
// substitute ALTERNC & domain variables
$zone = strtr($zone, array(
"%%fqdn%%" => "$L_FQDN",
@ -91,9 +95,6 @@ class m_bind {
"@@ZONETTL@@" => $ttl,
));
// add the SUBDOMAIN entries
$zone .= $this->conf_from_db($domain);
// add the "END ALTERNC CONF line";
$zone .= ";;; END ALTERNC AUTOGENERATE CONFIGURATION\n";