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?)
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
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