end
action :install do
- if not installed?
+ if !installed?
package package_name
updated = true
notifies :reload, "service[apache2]" if enabled?
end
- updated = updated || t.updated_by_last_action?
+ updated ||= t.updated_by_last_action?
end
new_resource.updated_by_last_action(updated)
end
action :enable do
- if not enabled?
+ unless enabled?
link enabled_name("load") do
to available_name("load")
owner "root"
owner "root"
group "root"
notifies :reload, "service[apache2]"
- only_if { ::File.exists?(available_name("conf")) }
+ only_if { ::File.exist?(available_name("conf")) }
end
new_resource.updated_by_last_action(true)
end
def installed?
- ::File.exists?(available_name("load"))
+ ::File.exist?(available_name("load"))
end
def enabled?
- ::File.exists?(enabled_name("load"))
+ ::File.exist?(enabled_name("load"))
end