# class Chef::Provider::Service::Insserv

### Public Instance Methods

disable_service() click to toggle source

    # File lib/chef/provider/service/insserv.rb, line 46
    def disable_service()
      run_command(:command => "/sbin/insserv -r -f #{@new_resource.service_name}")
    end

enable_service() click to toggle source

    # File lib/chef/provider/service/insserv.rb, line 41
    def enable_service()
      run_command(:command => "/sbin/insserv -r -f #{@new_resource.service_name}")
      run_command(:command => "/sbin/insserv -d -f #{@new_resource.service_name}")
    end

load_current_resource() click to toggle source
Calls superclass method Chef::Provider::Service::Simple#load_current_resource

    # File lib/chef/provider/service/insserv.rb, line 28
    def load_current_resource
      super

      # Look for a /etc/rc.*/SnnSERVICE link to signifiy that the service would be started in a runlevel
      if Dir.glob("/etc/rc**/S*#{@current_resource.service_name}").empty?
        @current_resource.enabled false
      else
        @current_resource.enabled true
      end

      @current_resource
    end