luban-monit 0.1.4 → 0.1.5
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: 45a1782fbbe1128e06199d5c622f6f697184d28a
|
4
|
+
data.tar.gz: c099c8d324fb02d94535036ddf08cd9bd92cd998
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b0cca1f506891b1c7bb7ea995cbb7b281d8e67c8eecc83356f04136c20031d59d5a9c80afde21bd06a98f9c9556c3381acbb71980b53e05fccee94d396242e5
|
7
|
+
data.tar.gz: b17a604e240e04d8e2ecd9bf9c8c9b5260059306dade31d1e3176d081e1863386047765c6c02d32a18983fa5d4bfa2e972687dda0c1c02bb3c9fd68b4d7f5d19
|
data/CHANGELOG.md
CHANGED
@@ -12,8 +12,9 @@ module Luban
|
|
12
12
|
@default_templates_path ||= Pathname.new(File.join(File.dirname(__FILE__), 'templates')).realpath
|
13
13
|
end
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
%i(config_test reload_process match_process).each do |action|
|
16
|
+
service_action action, dispatch_to: :controller
|
17
|
+
end
|
17
18
|
|
18
19
|
protected
|
19
20
|
|
@@ -34,6 +35,12 @@ module Luban
|
|
34
35
|
desc "Reload process"
|
35
36
|
action! :reload_process
|
36
37
|
end
|
38
|
+
|
39
|
+
task :match do
|
40
|
+
desc "Match process"
|
41
|
+
argument :pattern, "Regex for process match"
|
42
|
+
action! :match_process
|
43
|
+
end
|
37
44
|
end
|
38
45
|
end
|
39
46
|
end
|
@@ -15,7 +15,7 @@ module Luban
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def process_started?
|
18
|
-
super and check_process! =~ /^The Monit daemon #{package_major_version} uptime:/
|
18
|
+
super and check_process! =~ /^The Monit daemon #{package_major_version} uptime:|^Monit uptime:/
|
19
19
|
end
|
20
20
|
|
21
21
|
def config_test
|
@@ -26,6 +26,10 @@ module Luban
|
|
26
26
|
update_result reload_process!
|
27
27
|
end
|
28
28
|
|
29
|
+
def match_process
|
30
|
+
update_result match_process!
|
31
|
+
end
|
32
|
+
|
29
33
|
protected
|
30
34
|
|
31
35
|
def config_test!
|
@@ -47,6 +51,10 @@ module Luban
|
|
47
51
|
def reload_process!
|
48
52
|
capture("#{monit_command} reload 2>&1")
|
49
53
|
end
|
54
|
+
|
55
|
+
def match_process!
|
56
|
+
capture("#{monit_command} procmatch #{task.args.pattern} 2>&1")
|
57
|
+
end
|
50
58
|
end
|
51
59
|
end
|
52
60
|
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.1.
|
4
|
+
version: 0.1.5
|
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-06-
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: luban
|