wonko9-i_can_daemonize 0.7.1 → 0.7.2
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.
- data/VERSION.yml +1 -1
- data/lib/i_can_daemonize.rb +4 -3
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/i_can_daemonize.rb
CHANGED
@@ -304,14 +304,15 @@ module ICanDaemonize
|
|
304
304
|
# stop the daemon, nicely at first, and then forcefully if necessary
|
305
305
|
def stop_daemons
|
306
306
|
self.running = false
|
307
|
-
|
307
|
+
pids_to_stop = @instances || pids.size
|
308
|
+
puts "Stopping #{pids_to_stop} #{script_name} #{pluralize('instance', pids_to_stop)}..."
|
308
309
|
if pids.empty?
|
309
310
|
$stderr.puts "#{script_name} doesn't appear to be running"
|
310
311
|
exit(1)
|
311
312
|
end
|
312
313
|
pids.each_with_index do |pid, ii|
|
313
314
|
kill_pid(pid)
|
314
|
-
break if ii == (
|
315
|
+
break if ii == (pids_to_stop - 1)
|
315
316
|
end
|
316
317
|
end
|
317
318
|
|
@@ -429,7 +430,7 @@ module ICanDaemonize
|
|
429
430
|
end
|
430
431
|
|
431
432
|
def instances
|
432
|
-
@instances
|
433
|
+
@instances || 1
|
433
434
|
end
|
434
435
|
|
435
436
|
def pluralize(name, num)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wonko9-i_can_daemonize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Pisoni
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-06-15 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|