]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/letsencrypt/recipes/default.rb
Avoid exception iterating a non-existent directory
[chef.git] / cookbooks / letsencrypt / recipes / default.rb
index 834f215da691f3e32be009112640df620ff5a4d3..05b1c0fa8d5d0f561a4d71296ec07741d8db57ed 100644 (file)
@@ -1,8 +1,8 @@
 #
-# Cookbook Name:: letsencrypt
+# Cookbook:: letsencrypt
 # Recipe:: default
 #
-# Copyright 2017, OpenStreetMap Foundation
+# Copyright:: 2017, OpenStreetMap Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -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