# Open output files
my $zonefile = IO::File->new("> include/${zone}.js") || die "$!";
-my $jsonfile = IO::File->new("> json/${zone}.json") || die "$!";
+my $jsonfile = IO::File->new("> json/${zone}.openstreetmap.org.json") || die "$!";
# Output headers
$zonefile->print("var \U${zone}\E_RECORDS = [\n");
my $number = sprintf("%02d", $index + 1);
my $bandwidth = $server->{bandwidth};
- $gdnsweightedfile->print(" ${name}-${number} = [ ${name}-${number}.${zone}., ${bandwidth} ]\n");
+ $gdnsweightedfile->print(" ${name}-${number} = [ ${name}-${number}.${zone}.openstreetmap.org., ${bandwidth} ]\n");
}
}
}
else
{
- $gdnsresourcefile->print(" ${name} => ${name}.${zone}.\n");
+ $gdnsresourcefile->print(" ${name} => ${name}.${zone}.openstreetmap.org.\n");
}
}
if ($server->{ipv6})
{
- my $ipv6 = $server->{ipv6};
-
- $ipv6 =~ s/([0-9a-f]{4})(?=.)/$1:/ig;
-
- $zonefile->printf(" AAAA(\"${name}\", \"${ipv6}\", TTL(\"10m\")),\n", $index + 1);
+ $zonefile->printf(" AAAA(\"${name}\", \"$server->{ipv6}\", TTL(\"10m\")),\n", $index + 1);
}
}
}