view scripts/nameserver_autogen/bind_tld_zonefile @ 233:d38c3ed97acd draft

Revert "Merge branch 'master' of git://git1.somerandomnick.ano" This reverts commit 0a745779ffd160ff77dbba359fc077ce8a83270a, reversing changes made to 3ab900bec3253e8ccfdcba56e752da39723ee6fc.
author Nick <nick@somerandomnick.ano>
date Thu, 28 Oct 2010 03:13:25 +0000
parents 2e7c94478881
children 1299c56b6d5c 59102e1e06f9
line wrap: on
line source

#!/usr/bin/php
<?php
print('$ttl 600'."\n");
chdir('../db/dom/ano');
$names = scandir('./');
foreach ($names as $name) {
 if (!file_exists($name.'/ns/')) continue;
 $servers = scandir($name.'/ns/');
 foreach ($servers as $server) {
  if ($server[0] == '.') continue;
  print($name.' IN NS '.$server."\n");
  $ips = file($name.'/ns/'.$server, FILE_IGNORE_NEW_LINES |
   FILE_SKIP_EMPTY_LINES);
  foreach ($ips as $ip) {
   print($server.' IN A '.$ip."\n");
  }
 }
}
?>