Module: Specinfra::Command::Module::Service::Systemd

Included in:
Base::Service, Specinfra::Command::Module::Systemd
Defined in:
lib/specinfra/command/module/service/systemd.rb

Instance Method Summary collapse

Instance Method Details

#check_is_enabled_under_systemd(service, level = nil) ⇒ Object


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

def check_is_enabled_under_systemd(service, level=nil)
  "systemctl --quiet is-enabled #{escape(service)}"
end

#check_is_running_under_systemd(service) ⇒ Object


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

def check_is_running_under_systemd(service)
  "systemctl is-active #{escape(service)}"
end

#disable_under_systemd(service) ⇒ Object


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

def disable_under_systemd(service)
  "systemctl disable #{escape(service)}"
end

#enable_under_systemd(service) ⇒ Object


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

def enable_under_systemd(service)
  "systemctl enable #{escape(service)}"
end

#reload_under_systemd(service) ⇒ Object


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

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

#restart_under_systemd(service) ⇒ Object


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

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

#start_under_systemd(service) ⇒ Object


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

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

#stop_under_systemd(service) ⇒ Object


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

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