]> git.openstreetmap.org Git - dns.git/blobdiff - bin/mkgeo
Put some load on saphira and viserion
[dns.git] / bin / mkgeo
index bf5ca4d6ba578767694b8da147f255c8b9ca43f7..5a0b07a11fccd95851e48e9fb02b362d4aa541e6 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}})