Sha256: a378571057554b2a83de414a1d4503737ed0e25edb1f0c4f6d50c47e151d0c62

Contents?: true

Size: 808 Bytes

Versions: 109

Compression:

Stored size: 808 Bytes

Contents

class Specinfra::Command::Debian::Base::Service < Specinfra::Command::Linux::Base::Service
  class << self
    def check_is_enabled(service, level=3)
      # Until everything uses Upstart, this needs an OR.
      "ls /etc/rc#{level}.d/ | grep -- '^S..#{escape(service)}$' || grep '^\s*start on' /etc/init/#{escape(service)}.conf"
    end

    def enable(service)
      "update-rc.d #{escape(service)} defaults"
    end

    def disable(service)
      "update-rc.d -f #{escape(service)} remove"
    end

    def start(service)
      "service #{escape(service)} start"
    end

    def stop(service)
      "service #{escape(service)} stop"
    end

    def restart(service)
      "service #{escape(service)} restart"
    end

    def reload(service)
      "service #{escape(service)} reload"
    end
  end
end

Version data entries

109 entries across 109 versions & 3 rubygems

Version Path
specinfra-rb19-2.44.7 lib/specinfra/command/debian/base/service.rb
specinfra-2.68.2 lib/specinfra/command/debian/base/service.rb
specinfra-2.68.1 lib/specinfra/command/debian/base/service.rb
specinfra-2.68.0 lib/specinfra/command/debian/base/service.rb
specinfra-2.67.10 lib/specinfra/command/debian/base/service.rb
specinfra-2.67.9 lib/specinfra/command/debian/base/service.rb
specinfra-2.67.8 lib/specinfra/command/debian/base/service.rb
specinfra-2.67.7 lib/specinfra/command/debian/base/service.rb
specinfra-2.67.6 lib/specinfra/command/debian/base/service.rb
specinfra-2.67.5 lib/specinfra/command/debian/base/service.rb
specinfra-2.67.3 lib/specinfra/command/debian/base/service.rb
specinfra-2.67.2 lib/specinfra/command/debian/base/service.rb
specinfra-2.67.1 lib/specinfra/command/debian/base/service.rb
specinfra-2.67.0 lib/specinfra/command/debian/base/service.rb
specinfra-2.66.9 lib/specinfra/command/debian/base/service.rb
specinfra-2.66.8 lib/specinfra/command/debian/base/service.rb
specinfra-2.66.7 lib/specinfra/command/debian/base/service.rb
specinfra-2.66.6 lib/specinfra/command/debian/base/service.rb
specinfra-2.66.5 lib/specinfra/command/debian/base/service.rb
specinfra-2.66.4 lib/specinfra/command/debian/base/service.rb