Sha256: da36beecf0e9ed820d23d907e68c028ca05a4d68a4d583b15753cc8bc2f58956
Contents?: true
Size: 946 Bytes
Versions: 2
Compression:
Stored size: 946 Bytes
Contents
# Manage debian services. Start/stop is the same as InitSvc, but enable/disable # is special. Puppet::Type.type(:service).provide :debian, :parent => :init do desc "Debian's form of ``init``-style management. The only difference is that this supports service enabling and disabling via ``update-rc.d``." commands :update => "/usr/sbin/update-rc.d" defaultfor :operatingsystem => :debian def self.defpath superclass.defpath end # Remove the symlinks def disable update "-f", @resource[:name], "remove" end def enabled? output = update "-n", "-f", @resource[:name], "remove" # If it's enabled, then it will print output showing removal of # links. if output =~ /etc\/rc[\dS].d|not installed/ return :true else return :false end end def enable update @resource[:name], "defaults" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.24.0 | lib/puppet/provider/service/debian.rb |
puppet-0.24.1 | lib/puppet/provider/service/debian.rb |