Skip to content

Instantly share code, notes, and snippets.

@masterzen
Created March 14, 2011 14:57
Show Gist options
  • Save masterzen/869257 to your computer and use it in GitHub Desktop.
Save masterzen/869257 to your computer and use it in GitHub Desktop.
diff --git a/lib/puppet/provider/service/runit.rb b/lib/puppet/provider/service/runit.rb
index 0315b95..b83d235 100644
--- a/lib/puppet/provider/service/runit.rb
+++ b/lib/puppet/provider/service/runit.rb
@@ -71,7 +71,7 @@ Puppet::Type.type(:service).provide :runit, :parent => :daemontools do
output = sv "status", self.daemon
return :running if output =~ /^run: /
rescue Puppet::ExecutionFailure => detail
- unless detail.message =~ /(warning: |runsv not running$)/
+ unless detail.message =~ /(warning: |runsv not running$|unable to change to service directory$)/
raise Puppet::Error.new( "Could not get status for service #{resource.ref}: #{detail}" )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment