def load_current_resource
@current_resource = Chef::Resource::Service.new(@new_resource.name)
@current_resource.service_name(@new_resource.service_name)
@status_check_success = true
if @new_resource.status_command
Chef::Log.debug("#{@new_resource} you have specified a status command, running..")
begin
if run_command_with_systems_locale(:command => @new_resource.status_command) == 0
@current_resource.running(true)
end
rescue Chef::Exceptions::Exec
@status_check_success = false
@current_resource.running(false)
@current_resource.enabled(false)
nil
end
else
@current_resource.running(is_active?)
end
@current_resource.enabled(is_enabled?)
@current_resource
end