X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/a615c8af6b389f613acf1c80a7b56da48d780cc0..069e33163e0b09a7d647a98c2fde284a16a43b99:/cookbooks/apache/providers/conf.rb?ds=sidebyside diff --git a/cookbooks/apache/providers/conf.rb b/cookbooks/apache/providers/conf.rb index beef75ea5..da339b955 100644 --- a/cookbooks/apache/providers/conf.rb +++ b/cookbooks/apache/providers/conf.rb @@ -57,7 +57,7 @@ def create_conf group "root" mode 0644 variables new_resource.variables - notifies :reload, "service[apache2]" if enabled? or available_name == enabled_name + notifies :reload, "service[apache2]" if enabled? || available_name == enabled_name end new_resource.updated_by_last_action(t.updated_by_last_action?) @@ -93,7 +93,7 @@ end def available_name if node[:lsb][:release].to_f >= 14.04 - "/etc/apache2/conf-available/#{new_resource.name}" + "/etc/apache2/conf-available/#{new_resource.name}.conf" else "/etc/apache2/conf.d/#{new_resource.name}" end @@ -101,12 +101,12 @@ end def enabled_name if node[:lsb][:release].to_f >= 14.04 - "/etc/apache2/conf-enabled/#{new_resource.name}" + "/etc/apache2/conf-enabled/#{new_resource.name}.conf" else "/etc/apache2/conf.d/#{new_resource.name}" end end def enabled? - ::File.exists?(enabled_name) + ::File.exist?(enabled_name) end