diff options
| author | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-07-25 12:55:20 +0200 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-07-29 07:48:54 +1000 |
| commit | da828a4234754e9122034706ca65f6b6f7d5c2ab (patch) | |
| tree | c488956b45617d0284c1c50bfe52d95f39d1ef63 /lib/puppet | |
| parent | 389843629c5ec2950f44b0fdaacb1d7470bc4aec (diff) | |
Fix #2448 - fix the broken runit provider and tests
The runit provider was broken when the daemontools provider
was enhanced.This patch aims to fix this.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/provider/service/runit.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/provider/service/runit.rb b/lib/puppet/provider/service/runit.rb index 45713b270..b2c8900b6 100644 --- a/lib/puppet/provider/service/runit.rb +++ b/lib/puppet/provider/service/runit.rb @@ -91,6 +91,16 @@ Puppet::Type.type(:service).provide :runit, :parent => :daemontools do [ command(:sv), "stop", self.service] end + # relay to the startcmd + def start + enable unless enabled? + ucommand( :start ) + end + + def startcmd + [ command(:sv), "start", self.service] + end + # disable by removing the symlink so that runit # doesn't restart our service behind our back # note that runit doesn't need to perform a stop |
