]> git.openstreetmap.org Git - dns.git/commitdiff
Abort building a geo map if no servers are up
authorTom Hughes <tom@compton.nu>
Thu, 21 Dec 2023 10:27:50 +0000 (10:27 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 21 Dec 2023 10:27:50 +0000 (10:27 +0000)
bin/mkgeo

index 9a36ae23096bafa6a03aca5bb5b1e22200fcadde..2c0453b96bc784c29f4d7ab9fecca1e3831f1ef2 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -149,6 +149,9 @@ foreach my $server (@servers)
     }
 }
 
+# Abort if no servers at all are up
+exit 0 unless grep { $_->{status} eq "up" } values(%$clusters);
+
 # Create target origins object
 my $targetorigins = {};