diff options
Diffstat (limited to 'config/bind/bind.inc')
-rw-r--r-- | config/bind/bind.inc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/config/bind/bind.inc b/config/bind/bind.inc index 21e88e15..009befff 100644 --- a/config/bind/bind.inc +++ b/config/bind/bind.inc @@ -396,18 +396,19 @@ EOD; if($zone['allowtransfer'] == '') $zoneallowtransfer = "none"; else - $zoneallowtransfer = str_replace(',','; ',$zone['allowtransfer']); - $zone_conf = "\$TTL $zonetll\n;\n"; + $zoneallowtransfer = str_replace(',','; ',$zone['allowtransfer']); + $zone_conf = "\$TTL {$zonetll}\n;\n"; + $zone_conf .= "\$ORIGIN {$zonename}.\n\n"; $zone_conf .= ";\tDatabase file {$zonename}.DB for {$zonename} zone.\n"; $zone_conf .= ";\tDo not edit this file!!!\n"; $zone_conf .= ";\tZone version {$zoneserial}\n;\n"; if($zonereverso == "on" || $zonetype =="redirect") - $zone_conf .= "@\t IN SOA $zonenameserver. \t $zonemail. (\n"; + $zone_conf .= "@\t IN SOA $zonenameserver. \t $zonemail. (\n"; else - $zone_conf .= "$zonename.\t IN SOA $zonenameserver. \t $zonemail. (\n"; + $zone_conf .= "$zonename.\t IN SOA $zonenameserver. \t $zonemail. (\n"; - $zone_conf .= "\t\t$zoneserial ; serial\n"; - $zone_conf .= "\t\t$zonerefresh ; refresh\n"; + $zone_conf .= "\t\t$zoneserial ; serial\n"; + $zone_conf .= "\t\t$zonerefresh ; refresh\n"; $zone_conf .= "\t\t$zoneretry ; retry\n"; $zone_conf .= "\t\t$zoneexpire ; expire\n"; $zone_conf .= "\t\t$zoneminimum ; default_ttl\n\t\t)\n\n"; @@ -431,6 +432,9 @@ EOD; $zone_conf .= "$hostname \t IN $hosttype $hostvalue \t$hostdst\n"; } + if ($zone['customzonerecords']!=""){ + $zone_conf .= "\n\n;\n;custom zone records\n;\n".base64_decode($zone['customzonerecords'])."\n"; + } file_put_contents(CHROOT_LOCALBASE."/etc/namedb/$zonetype/$zoneview/$zonename.DB", $zone_conf); $config["installedpackages"]["bindzone"]["config"][$x][resultconfig]=base64_encode($zone_conf); $write_config++; |