]> git.openstreetmap.org Git - dns.git/commitdiff
Update statuscake cache file atomically
authorTom Hughes <tom@compton.nu>
Thu, 18 Jun 2020 17:25:10 +0000 (18:25 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 18 Jun 2020 17:25:10 +0000 (18:25 +0100)
bin/mkgeo

index 9b2e4d35f32d14d52dc8268650ed14d57eda8ae8..2113c092f12d29b3a0c861a26013cd3b7c6c0fa8 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -119,7 +119,8 @@ if ($ENV{STATUSCAKE_USERNAME} && $ENV{STATUSCAKE_APIKEY})
         }
     }
 
-    DumpFile("statuscake.yml", $cache);
+    DumpFile("statuscake-$$.yml", $cache);
+    link("statuscake-$$.yml", "statuscake.yml");
 }
 
 # Mark a cluster as up if any servers are up