def define_resource_requirements
shared_resource_requirements
requirements.assert(:all_actions) do |a|
if !@command_success
whyrun_msg = @new_resource.status_command ? "Provided status command #{@new_resource.status_command} failed." :
"Could not determine upstart state for service"
end
a.assertion { @command_success }
a.whyrun "#{whyrun_msg} Assuming service installed and not running."
end
requirements.assert(:all_actions) do |a|
a.assertion { @config_file_found }
a.whyrun "Could not find #{@upstart_job_dir}/#{@new_resource.service_name}#{@upstart_conf_suffix}. Assuming service is disabled."
end
end