]> git.openstreetmap.org Git - dns.git/blobdiff - bin/mkgeo
Add sotm.org
[dns.git] / bin / mkgeo
index bf5ca4d6ba578767694b8da147f255c8b9ca43f7..4bd4db2f8a9d3ea16c19409f56d45939a57ddfce 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -94,6 +94,10 @@ if ($ENV{PINGDOM_USERNAME} && $ENV{PINGDOM_PASSWORD})
                 $server->{status} = $cache->{$server->{pingdom}} || "down";
             }
         }
                 $server->{status} = $cache->{$server->{pingdom}} || "down";
             }
         }
+        else
+        {
+            $server->{status} = "down";
+        }
     }
 
     YAML::DumpFile("pingdom.yml", $cache);
     }
 
     YAML::DumpFile("pingdom.yml", $cache);
@@ -273,30 +277,30 @@ sub match_origin
     {
         $match = "preferred";
     }
     {
         $match = "preferred";
     }
-    elsif ($cluster->{preferred} &&
-           $cluster->{preferred}->{continents} &&
-           grep { $_ eq $origin->{continent} } @{$cluster->{preferred}->{continents}})
-    {
-        $match = "preferred";
-    }
     elsif ($cluster->{allowed} &&
            $cluster->{allowed}->{countries} &&
            grep { $_ eq $origin->{country} } @{$cluster->{allowed}->{countries}})
     {
         $match = "allowed";
     }
     elsif ($cluster->{allowed} &&
            $cluster->{allowed}->{countries} &&
            grep { $_ eq $origin->{country} } @{$cluster->{allowed}->{countries}})
     {
         $match = "allowed";
     }
-    elsif ($cluster->{allowed} &&
-           $cluster->{allowed}->{continents} &&
-           grep { $_ eq $origin->{continent} } @{$cluster->{allowed}->{continents}})
-    {
-        $match = "allowed";
-    }
     elsif ($cluster->{denied} &&
            $cluster->{denied}->{countries} &&
            grep { $_ eq $origin->{country} } @{$cluster->{denied}->{countries}})
     {
         $match = "denied";
     }
     elsif ($cluster->{denied} &&
            $cluster->{denied}->{countries} &&
            grep { $_ eq $origin->{country} } @{$cluster->{denied}->{countries}})
     {
         $match = "denied";
     }
+    elsif ($cluster->{preferred} &&
+           $cluster->{preferred}->{continents} &&
+           grep { $_ eq $origin->{continent} } @{$cluster->{preferred}->{continents}})
+    {
+        $match = "preferred";
+    }
+    elsif ($cluster->{allowed} &&
+           $cluster->{allowed}->{continents} &&
+           grep { $_ eq $origin->{continent} } @{$cluster->{allowed}->{continents}})
+    {
+        $match = "allowed";
+    }
     elsif ($cluster->{denied} &&
            $cluster->{denied}->{continents} &&
            grep { $_ eq $origin->{continent} } @{$cluster->{denied}->{continents}})
     elsif ($cluster->{denied} &&
            $cluster->{denied}->{continents} &&
            grep { $_ eq $origin->{continent} } @{$cluster->{denied}->{continents}})
@@ -401,11 +405,11 @@ sub output_server
     {
         if ($server->{status} eq "up")
         {
     {
         if ($server->{status} eq "up")
         {
-            $zonefile->print("+${name}:$server->{ipv4}:3600\n");
+            $zonefile->print("+${name}:$server->{ipv4}:600\n");
 
             if ($server->{ipv6})
             {
 
             if ($server->{ipv6})
             {
-#                $zonefile->print("3${name}:$server->{ipv6}:3600\n");
+#                $zonefile->print("3${name}:$server->{ipv6}:600\n");
             }
         }
     }
             }
         }
     }