Sorry, I know this is an old posting, that I'm trying to resurrect.

So I have a module for solaris similar to what's described below for the 
system-log service.  Basically when we load a server, system-log is already 
enabled with a stock /etc/syslog.conf file.  Using the openvpn example 
below, I've noticed that when my module pushes a new syslog.conf file - say 
for remote logging - the puppet agent does not restart the smf service.

Can that be forced?  I thought the subscribe would make that happen.  I 
have have hasrestart => true as well, but updating the file does not force 
the service to restart.

Thanks.

On Wednesday, March 14, 2012 3:04:48 AM UTC-4, jerry wrote:
>
> Why would you like to do this? With the following service provider (as a 
> sample) openvpn would be restarted if the service is in a maintenance state 
> (if possible) or disabled. Or do I miss your point?
>
> service { 'openvpn':
>     ensure    => running,
>     provider  => smf,
>     enable    => true,
>     require   => File['/var/svc/manifest/application/network/openvpn.xml'],
>     subscribe => File['/etc/openvpn/server.conf'],
>     manifest  => '/var/svc/manifest/application/network/openvpn.xml',
> }
>
> HTH.
>
> Am 13.03.2012 um 20:03 schrieb Afroz Hussain:
>
> > Hi,
> > 
> > Is there any way to restart a service based on the status of the
> > service using Puppet service resource? I want to check the status of
> > the service first then disable it , and make sure that the service has
> > disable successfully then start the service.
> > 
> > Any help will be appreciated.
> > 
> > Thanks in advance
> > Afroz Hussain
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/cuNEMiyo7n8J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to