base.rb

Path: lib/puppet/provider/service/base.rb
Last Update: Wed Dec 09 12:54:29 -0800 2009

Methods

getpid   instances   restart   restartcmd   start   startcmd   status   statuscmd   stop   stopcmd   texecute   ucommand  

Public Class methods

Public Instance methods

Get the process ID for a running process. Requires the ‘pattern’ parameter.

How to restart the process.

There is no default command, which causes other methods to be used

Run the ‘start’ parameter command, or the specified ‘startcmd’.

The command used to start. Generated if the ‘binary’ argument is passed.

Check if the process is running. Prefer the ‘status’ parameter, then ‘statuscmd’ method, then look in the process table. We give the object the option to not return a status command, which might happen if, for instance, it has an init script (and thus responds to ‘statuscmd’) but does not have ‘hasstatus’ enabled.

There is no default command, which causes other methods to be used

Stop the service. If a ‘stop’ parameter is specified, it takes precedence; otherwise checks if the object responds to a ‘stopcmd’ method, and if so runs that; otherwise, looks for the process in the process table. This method will generally not be overridden by submodules.

There is no default command, which causes other methods to be used

A simple wrapper so execution failures are a bit more informative.

Use either a specified command or the default for our provider.

[Validate]