]> git.openstreetmap.org Git - dns.git/blobdiff - bin/mkgeo
Add mta-sts DNS alias
[dns.git] / bin / mkgeo
index 2e0ac009c192c1efc44dbab4da62ebee729ab6ab..f23d0c56c5d02c752aff6a17187f733e1e4ac8a5 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -294,7 +294,7 @@ if (defined($gdnsname))
     my $continent = "";
 
     $gdnsmapfile->print("${gdnsname} => {\n");
-    $gdnsmapfile->print("  geoip2_db => /var/lib/GeoIP/GeoLite2-Country.mmdb\n");
+    $gdnsmapfile->print("  geoip2_db => /usr/share/GeoIP/GeoLite2-Country.mmdb\n");
     $gdnsmapfile->print("  datacenters => [" . join(",", sort(keys(%$clusters))) . "]\n");
     $gdnsmapfile->print("  map => {\n");
     $gdnsmapfile->print("    default => [" . join(",", sort(map { $_->{name} } grep { $_->{default} } values(%$clusters))) . "]\n");
@@ -331,8 +331,6 @@ if (defined($gdnsname))
     {
         my $name = $cluster->{name};
 
-        $gdnsresourcefile->print("    ${name} => ${name}.${zone}.\n");
-
         if (@{$cluster->{servers}} > 1)
         {
             $gdnsweightedfile->print("${name} => {\n");
@@ -349,6 +347,12 @@ if (defined($gdnsname))
             }
 
             $gdnsweightedfile->print("}\n");
+
+            $gdnsresourcefile->print("    ${name} => %weighted!${name}\n");
+        }
+        else
+        {
+            $gdnsresourcefile->print("    ${name} => ${name}.${zone}.\n");
         }
     }
 
@@ -524,7 +528,7 @@ sub output_server
 
             if ($server->{ipv6})
             {
-#                $zonefile->printf("3${name}:$server->{ipv6}:600\n", $index + 1);
+                $zonefile->printf("3${name}:$server->{ipv6}:600\n", $index + 1);
             }
         }
     }