X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/a57ccf4747c323d295f4445771113d769eefa0bc..0cb42478ac4a41c21bd564360dbb07ad722dc90b:/cookbooks/apache/providers/site.rb diff --git a/cookbooks/apache/providers/site.rb b/cookbooks/apache/providers/site.rb index 1b13a3d02..86fecbfcf 100644 --- a/cookbooks/apache/providers/site.rb +++ b/cookbooks/apache/providers/site.rb @@ -68,15 +68,28 @@ def site_directory end def available_name - "/etc/apache2/sites-available/#{new_resource.name}" + if node[:lsb][:release].to_f >= 14.04 + "/etc/apache2/sites-available/#{new_resource.name}.conf" + else + "/etc/apache2/sites-available/#{new_resource.name}" + end end def enabled_name - case new_resource.name - when "default" - "/etc/apache2/sites-enabled/000-default" + if node[:lsb][:release].to_f >= 14.04 + case new_resource.name + when "default" + "/etc/apache2/sites-enabled/000-default.conf" + else + "/etc/apache2/sites-enabled/#{new_resource.name}.conf" + end else - "/etc/apache2/sites-enabled/#{new_resource.name}" + case new_resource.name + when "default" + "/etc/apache2/sites-enabled/000-default" + else + "/etc/apache2/sites-enabled/#{new_resource.name}" + end end end