From 86f1304d5c5cf6783a815a983399d757bfb5913e Mon Sep 17 00:00:00 2001 From: tbrehm Date: Tue, 15 Sep 2009 15:11:58 +0000 Subject: [PATCH] Added a DNS export script that exports the ispconfig database into bind file format. --- helper_scripts/dns_export_to_bind.php | 103 ++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 helper_scripts/dns_export_to_bind.php diff --git a/helper_scripts/dns_export_to_bind.php b/helper_scripts/dns_export_to_bind.php new file mode 100644 index 0000000000..beca21c816 --- /dev/null +++ b/helper_scripts/dns_export_to_bind.php @@ -0,0 +1,103 @@ +0) +#{ +#fwrite($f,$row2['2']); +#fwrite($f," "); +#} +#fwrite($f,$row2['3']); +#fwrite($f,"\n"); +#} +#fclose($f); +#### ENDE Primärer Namerserver ########################################################################################################### + +### Hier ALLES Aktivieren bei Secondary Nameserver ###################################################################################### +$tmp1 = substr($row["ns"],0,-1); +$tmp2 = substr($row["origin"],0,-1); +$nsip = hostname2ipfunktion($tmp1); +if ($nsip == $tmp1) { +echo "$tmp2 $tmp1 Not a valid Nameserver"; +echo "\n"; +} +else { +fwrite($fx,"zone \""); +fwrite($fx,substr($row["origin"],0,-1)); +fwrite($fx,"\" in { type slave; file \""); +fwrite($fx,substr($row["origin"],0,-1)); +fwrite($fx,"\"; masters {"); +fwrite($fx,"$nsip; }; };"); +fwrite($fx,"\n"); +} +### ENDE Secondary Nameserver ########################################################################################################### +} +fclose($fx); +exec("/etc/init.d/bind9 reload"); +?> \ No newline at end of file -- GitLab