Class: Specinfra::Command::Ubuntu::Base::Service

Inherits:
Debian::Base::Service show all
Defined in:
lib/specinfra/command/ubuntu/base/service.rb

Direct Known Subclasses

V15::Service

Class Method Summary collapse

Methods inherited from Debian::Base::Service

check_is_enabled, disable, enable, reload, restart, start, stop

Methods included from Module::Service::God

#check_is_monitored_by_god

Methods included from Module::Service::Monit

#check_is_monitored_by_monit

Methods included from Module::Service::Runit

#check_is_enabled_under_runit, #check_is_running_under_runit

Methods included from Module::Service::Upstart

#check_is_running_under_upstart

Methods included from Module::Service::Supervisor

#check_is_running_under_supervisor

Methods included from Module::Service::Daemontools

#check_is_enabled_under_daemontools, #check_is_running_under_daemontools, #disable_under_daemontools, #enable_under_daemontools, #reload_under_daemontools, #restart_under_daemontools, #start_under_daemontools, #stop_under_daemontools

Methods included from Module::Service::Systemd

#check_is_enabled_under_systemd, #check_is_running_under_systemd, #disable_under_systemd, #enable_under_systemd, #reload_under_systemd, #restart_under_systemd, #start_under_systemd, #stop_under_systemd

Methods included from Module::Service::Init

#check_is_enabled_under_init, #check_is_running_under_init, #disable_under_init, #enable_under_init, #reload_under_init, #restart_under_init, #start_under_init, #stop_under_init

Methods included from Module::Service::Delegator

#def_delegator_service_under

Methods inherited from Base

escape

Class Method Details

.check_is_running(service) ⇒ Object



3
4
5
# File 'lib/specinfra/command/ubuntu/base/service.rb', line 3

def check_is_running(service)
  "service #{escape(service)} status && service #{escape(service)} status | egrep 'running|online'"
end

.create(os_info = nil) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/specinfra/command/ubuntu/base/service.rb', line 7

def create(os_info=nil)
  if (os_info || os)[:release].to_i < 15
    self
  else
    Specinfra::Command::Ubuntu::V15::Service
  end
end