def load_current_resource
@new_resource.supports[:status] = true
@new_resource.supports[:restart] = true
@found_script = false
super
@current_resource.enabled(
Dir.glob("/etc/runlevels/**/#{@current_resource.service_name}").any? do |file|
@found_script = true
exists = ::File.exists? file
readable = ::File.readable? file
Chef::Log.debug "#{@new_resource} exists: #{exists}, readable: #{readable}"
exists and readable
end
)
Chef::Log.debug "#{@new_resource} enabled: #{@current_resource.enabled}"
@current_resource
end