Class: Specinfra::Command::Base::Service
Class Method Summary
collapse
create, escape
Class Method Details
.check_is_monitored_by_god(service) ⇒ Object
27
28
29
|
# File 'lib/specinfra/command/base/service.rb', line 27
def check_is_monitored_by_god(service)
"god status #{escape(service)}"
end
|
.check_is_monitored_by_monit(service) ⇒ Object
23
24
25
|
# File 'lib/specinfra/command/base/service.rb', line 23
def check_is_monitored_by_monit(service)
"monit status"
end
|
.check_is_running(service) ⇒ Object
3
4
5
|
# File 'lib/specinfra/command/base/service.rb', line 3
def check_is_running(service)
"service #{escape(service)} status"
end
|
15
16
17
|
# File 'lib/specinfra/command/base/service.rb', line 15
def check_is_running_under_daemontools(service)
"svstat /service/#{escape(service)} | grep -E 'up \\(pid [0-9]+\\)'"
end
|
.check_is_running_under_runit(service) ⇒ Object
19
20
21
|
# File 'lib/specinfra/command/base/service.rb', line 19
def check_is_running_under_runit(service)
"sv status #{escape(service)} | grep -E '^run: '"
end
|
.check_is_running_under_supervisor(service) ⇒ Object
7
8
9
|
# File 'lib/specinfra/command/base/service.rb', line 7
def check_is_running_under_supervisor(service)
"supervisorctl status #{escape(service)} | grep RUNNING"
end
|
.check_is_running_under_upstart(service) ⇒ Object
11
12
13
|
# File 'lib/specinfra/command/base/service.rb', line 11
def check_is_running_under_upstart(service)
"initctl status #{escape(service)} | grep running"
end
|