luban-monit 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68468611008e497bc3344da2a782a7f19f7b7ccd
|
4
|
+
data.tar.gz: 5a6f8e646155111209249abc12f025862f48d1fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fd3eb1682b2d6af4d465568a01d2677214a8366f0075afe4c0889ef203681388667d06846d6741624e3ca03805a1fad5605e9610383eb74d2bcb79d28d4d4bb
|
7
|
+
data.tar.gz: 091e3e7171a422788b5746519a10c78a98efee3a5d66c31b5d0f2ff8804cd1fcfb9ca0d2c99a1cb8a55081cd03c239eb37db2e57c89cafba0a63a7c046da38d9
|
data/CHANGELOG.md
CHANGED
@@ -5,16 +5,24 @@ module Luban
|
|
5
5
|
class Controller < Luban::Deployment::Service::Controller
|
6
6
|
module Commands
|
7
7
|
module Public
|
8
|
+
def monitor_control_file_name
|
9
|
+
@monitor_control_file_name ||= 'monitrc'
|
10
|
+
end
|
11
|
+
|
12
|
+
def monit_command
|
13
|
+
@monit_command ||= "#{monitor_executable} -c #{monitor_control_file_path}"
|
14
|
+
end
|
15
|
+
|
8
16
|
def monitor_command(service_entry)
|
9
|
-
@monitor_command ||= shell_command("#{
|
17
|
+
@monitor_command ||= shell_command("#{monit_command} monitor #{service_entry}")
|
10
18
|
end
|
11
19
|
|
12
20
|
def unmonitor_command(service_entry)
|
13
|
-
@unmonitor_command ||= shell_command("#{
|
21
|
+
@unmonitor_command ||= shell_command("#{monit_command} unmonitor #{service_entry}")
|
14
22
|
end
|
15
23
|
|
16
24
|
def reload_monitor_command
|
17
|
-
@reload_monitor_command ||= shell_command("#{
|
25
|
+
@reload_monitor_command ||= shell_command("#{monit_command} reload")
|
18
26
|
end
|
19
27
|
end
|
20
28
|
|
@@ -24,11 +32,6 @@ module Luban
|
|
24
32
|
base.define_executable 'monit'
|
25
33
|
end
|
26
34
|
|
27
|
-
def monit_command
|
28
|
-
@monit_command ||= "#{monit_executable}"
|
29
|
-
end
|
30
|
-
alias_method :monitor_executable, :monit_command
|
31
|
-
|
32
35
|
def process_pattern
|
33
36
|
@process_pattern ||= "^#{monit_command}"
|
34
37
|
end
|
@@ -44,6 +47,10 @@ module Luban
|
|
44
47
|
|
45
48
|
include Commands
|
46
49
|
|
50
|
+
alias_method :monitor_executable, :monit_executable
|
51
|
+
alias_method :monitor_control_file_path, :control_file_path
|
52
|
+
alias_method :control_file_name, :monitor_control_file_name
|
53
|
+
|
47
54
|
def process_stopped?
|
48
55
|
super and check_process! =~ /the monit daemon is not running$/
|
49
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luban-monit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rubyist Chi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: luban
|