module ForemanMaintain::Utils

Public Class Methods

system_service(name, priority, options = {}) click to toggle source
# File lib/foreman_maintain/utils/service.rb, line 6
def self.system_service(name, priority, options = {})
  db_feature = options.fetch(:db_feature, nil)
  if db_feature.respond_to?(:local?) && !db_feature.local?
    Service::RemoteDB.new(name, priority, options)
  else
    Service::Systemd.new(name, priority, options)
  end
end
valid_sys_service?(service) click to toggle source
# File lib/foreman_maintain/utils/service.rb, line 15
def self.valid_sys_service?(service)
  service.class < Service::Abstract
end