Service resource on ubuntu

Hello,

I have a few custom init scripts that I would like to configure using chef.
It is unclear what the service resource does when you attempt to control the
service.

[NOTE: I am using chef-solo ]

If we assume that the service script is already installed and the recipe
states

service “sample” do
action [ :stop]
end

What actually happens? Does chef just execute “/etc/init.d/sample stop” or
does the behavior depend on how the resource is configured (ie if I
specified a start_command, etc)?

If no other configuration is specified except what is given above, how does
chef attempt to shut down the service?

Thank you,

Brian Connolly

Other Information

  • OS version= Ubuntu 9.10
  • Chef version = 0.8.16