In your place I would merge those two into a single init script with the usual 
lsb-ish start+stop+restart+status that puppet's service type/provider expects. 
They both control the same service and thus should be defined in a single 
resource.

On Thu, Jul 03, 2014 at 05:53:01AM -0700, Satish Katuru wrote:
>    Hi ,
> 
>    My init.pp has two service elements like below:
> 
>    class httpd
>    {
> 
>    service{
>    "startjavaservice.sh":
>    ensure => "running",
>    }
> 
>    service{
>    "stopjavaservice.sh":
>    ensure =>"stopped",
> 
>    }
>    }
> 
>    First one is for starting Java service and the second one is for stopping
>    the same service.
> 
>    Problem:
> 
>    When it has  only one service then it is working fine but when it has two
>    services it is not working.
> 
>    (If  It has only startjavaservice then java service is getting started
>    successfully and if it has only stopjavaservice java service is getting
>    stopped.
>    If it has both the services first service should start and then it should
>    be stopped but here only first thing happened. Java service has started
>    but not stopped)
> 
>    Can any one help me out on this?
> 
>    Regards,
>    Sathish.
> 
>    --
>    You received this message because you are subscribed to the Google Groups
>    "Puppet Users" group.
>    To unsubscribe from this group and stop receiving emails from it, send an
>    email to [1][email protected].
>    To view this discussion on the web visit
>    
> [2]https://groups.google.com/d/msgid/puppet-users/14b889bb-bbdf-4818-baa7-995a8d6afdd8%40googlegroups.com.
>    For more options, visit [3]https://groups.google.com/d/optout.
> 
> References
> 
>    Visible links
>    1. mailto:[email protected]
>    2. 
> https://groups.google.com/d/msgid/puppet-users/14b889bb-bbdf-4818-baa7-995a8d6afdd8%40googlegroups.com?utm_medium=email&utm_source=footer
>    3. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20140703131722.GA15275%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/d/optout.

Reply via email to