bluepill 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bluepill.gemspec +2 -2
- data/lib/bluepill/process.rb +8 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
data/bluepill.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{bluepill}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Arya Asemanfar", "Gary Tsang", "Rohith Ravi"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-26}
|
13
13
|
s.default_executable = %q{bluepill}
|
14
14
|
s.description = %q{Bluepill keeps your daemons up while taking up as little resources as possible. After all you probably want the resources of your server to be used by whatever daemons you are running rather than the thing that's supposed to make sure they are brought back up, should they die or misbehave.}
|
15
15
|
s.email = %q{entombedvirus@gmail.com}
|
data/lib/bluepill/process.rb
CHANGED
@@ -248,7 +248,7 @@ module Bluepill
|
|
248
248
|
|
249
249
|
def stop_process
|
250
250
|
if stop_command
|
251
|
-
cmd = stop_command
|
251
|
+
cmd = process_command(stop_command)
|
252
252
|
logger.warning "Executing stop command: #{cmd}"
|
253
253
|
|
254
254
|
result = System.execute_blocking(cmd, :uid => self.uid, :gid => self.gid)
|
@@ -270,7 +270,9 @@ module Bluepill
|
|
270
270
|
if restart_command
|
271
271
|
logger.warning "Executing restart command: #{restart_command}"
|
272
272
|
|
273
|
-
|
273
|
+
cmd = process_command(restart_command)
|
274
|
+
result = System.execute_blocking(cmd, :uid => self.uid, :gid => self.gid)
|
275
|
+
|
274
276
|
unless result[:exit_code].zero?
|
275
277
|
logger.warning "Restart command execution returned non-zero exit code:"
|
276
278
|
logger.warning result.inspect
|
@@ -364,6 +366,10 @@ module Bluepill
|
|
364
366
|
def deep_copy
|
365
367
|
Marshal.load(Marshal.dump(self))
|
366
368
|
end
|
369
|
+
|
370
|
+
def process_command(cmd)
|
371
|
+
cmd.to_s.gsub("{{PID}}", actual_pid.to_s)
|
372
|
+
end
|
367
373
|
end
|
368
374
|
end
|
369
375
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bluepill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arya Asemanfar
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-10-
|
14
|
+
date: 2009-10-26 00:00:00 -07:00
|
15
15
|
default_executable: bluepill
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|