Module: Specinfra::Command::Module::Service::Init

Included in:
Base::Service
Defined in:
lib/specinfra/command/module/service/init.rb

Instance Method Summary collapse

Instance Method Details

#check_is_enabled_under_init(service, level = 3) ⇒ Object



6
7
8
# File 'lib/specinfra/command/module/service/init.rb', line 6

def check_is_enabled_under_init(service, level=3)
  "chkconfig --list #{escape(service)} | grep #{level}:on"
end

#check_is_running_under_init(service) ⇒ Object



10
11
12
# File 'lib/specinfra/command/module/service/init.rb', line 10

def check_is_running_under_init(service)
  "service #{escape(service)} status"
end

#disable_under_init(service) ⇒ Object



18
19
20
# File 'lib/specinfra/command/module/service/init.rb', line 18

def disable_under_init(service)
  "chkconfig #{escape(service)} off"
end

#enable_under_init(service) ⇒ Object



14
15
16
# File 'lib/specinfra/command/module/service/init.rb', line 14

def enable_under_init(service)
  "chkconfig #{escape(service)} on"
end

#reload_under_init(service) ⇒ Object



34
35
36
# File 'lib/specinfra/command/module/service/init.rb', line 34

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

#restart_under_init(service) ⇒ Object



30
31
32
# File 'lib/specinfra/command/module/service/init.rb', line 30

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

#start_under_init(service) ⇒ Object



22
23
24
# File 'lib/specinfra/command/module/service/init.rb', line 22

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

#stop_under_init(service) ⇒ Object



26
27
28
# File 'lib/specinfra/command/module/service/init.rb', line 26

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