Avoid exception iterating a non-existent directory
authorTom Hughes <tom@compton.nu>
Thu, 16 Jan 2020 22:34:29 +0000 (22:34 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 16 Jan 2020 22:34:29 +0000 (22:34 +0000)
cookbooks/letsencrypt/recipes/default.rb

index 42d1e4678c859faf609ecc0682f725797c2baa5e..05b1c0fa8d5d0f561a4d71296ec07741d8db57ed 100644 (file)
@@ -150,7 +150,7 @@ certificates.each do |name, details|
   end
 end
 
-Dir.each_child("/srv/acme.openstreetmap.org/requests") do |name|
+Dir.glob("*", :base => "/srv/acme.openstreetmap.org/requests") do |name|
   next if certificates.include?(name)
 
   file "/srv/acme.openstreetmap.org/requests/#{name}" do