>
> My site.pp:
>
> file { "/etrade/home/jleggett/puppettest":
> owner => jleggett,
> mode => 644,
> ensure => present,
> }
>
> service { "bluetooth":
> ensure => stopped,
> }
Because the running daemons don't match the service name you'll need
to specify a way to check for status, or a pattern to use when running
ps:
For example:
status => "/bin/ps -ef | /bin/grep h[c]id"
http://reductivelabs.com/trac/puppet/wiki/TypeReference#service
-Blake
> Ah I see... I took where it said that Red Hat was both:
>
> # enableable: The provider can enable and disable the service
> # refreshable: The provider can restart the service.
>
> That it "knew" already how to do so. I see now, it needs the status
> for a service. That's not really clear in the Type Reference.
the problem is that many distros don't have the status in the init.d
scripts, this is why hasstatus is set to false by default.
you can set hasstatus => true which will also work for your case.
greets Pete
This only works when the init scripts conform to the LSB[1]
specifications.. i.e.
$? = 0 RUNNING
$? = 3 NOT RUNNING
If the init script does not conform, it's recommended (as earlier
posted) to specify 'pattern' with a regex match on the process name
(Ruby Regex, 'ntp' == /ntp/)
> greets Pete
>
> >
>
Regards,
AJ
[1]
http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html