freyr 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/freyr/cli/monitor.rb +1 -1
- data/lib/freyr/command.rb +2 -2
- data/lib/freyr/pinger.rb +2 -0
- data/lib/freyr/service.rb +3 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/lib/freyr/cli/monitor.rb
CHANGED
data/lib/freyr/command.rb
CHANGED
@@ -3,7 +3,7 @@ module Freyr
|
|
3
3
|
class Command
|
4
4
|
extend Forwardable
|
5
5
|
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :service
|
7
7
|
|
8
8
|
def initialize(service, command=nil, args = {})
|
9
9
|
@service = service
|
@@ -17,7 +17,7 @@ module Freyr
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def run!
|
20
|
-
|
20
|
+
raise "no start command found for service #{name}" unless command
|
21
21
|
kill! if service.alive?
|
22
22
|
|
23
23
|
require_admin
|
data/lib/freyr/pinger.rb
CHANGED
data/lib/freyr/service.rb
CHANGED
@@ -22,9 +22,9 @@ module Freyr
|
|
22
22
|
|
23
23
|
def pid_file
|
24
24
|
@pid_file ||= begin
|
25
|
-
raise NoProcMatch, "please provide proc_match for service #{@info.name}" unless @info.proc_match
|
25
|
+
raise NoProcMatch, "please provide proc_match for service #{@info.name} defined in #{info.defined_in.join(",")}" unless @info.proc_match
|
26
26
|
PidFile.new(@info.pid_file,@info.proc_match)
|
27
|
-
end
|
27
|
+
end if info.start
|
28
28
|
end
|
29
29
|
|
30
30
|
def start!
|
@@ -44,7 +44,7 @@ module Freyr
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def alive?
|
47
|
-
pid_file.alive?
|
47
|
+
pid_file.alive? if pid_file
|
48
48
|
end
|
49
49
|
|
50
50
|
def call_graph
|
metadata
CHANGED