daemonite 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/daemonite.gemspec +1 -1
  3. data/lib/daemonite.rb +9 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1899e505246fe53e2c35fd6a9bacb56d88054fab42fba2f4b6bdf72a6382e8f
4
- data.tar.gz: 6b5689d8dcf5394692aa69f0b6039aabda566a0a7a18cd3662e1eeed17d1b470
3
+ metadata.gz: 62d8dd46ec738b5e6b246c86ceead1b03682b1579dd40a44048dbb316694bc5f
4
+ data.tar.gz: 3f25d52e80286edc9f6957b437edb53dcbe74deba57482237700358a2d801305
5
5
  SHA512:
6
- metadata.gz: 746048311f81405f042ff19cdf6b3a0ee6cd6739dd4afd14498b86a3cf54c25cf9efa6e8f5778944e4452f8912545494adf79e0aad6b345753d8e33e4c3f3d48
7
- data.tar.gz: af685fb61f0466f1aacc5643a63107db35d7b3159f343e793d7a567ef55b7a4fb7e0f4158635c6ab497e3b874207243dca8e1f147f8b0a4f4a205db862a01293
6
+ metadata.gz: 20c8c017f7f846fad18be36e40a2b5f32f2b285ed5fad2e83aa675756bcb0f0c55935e1ef04b15cda50b1283037e46d6903bc12519d21cbfbf0f1111c60b7ec3
7
+ data.tar.gz: 78a442b97feaa7d013fb4c46f8ded4264cffb199f0c5b9a55ad5470936e52a16bf8870678cf9d5361060b169ddb03cfea1ea8830b8541c351d578097c12b271a
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "daemonite"
3
- s.version = "0.5.6"
3
+ s.version = "0.5.7"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Daemonite - Process.daemon and argparse wrapper for loopies."
@@ -33,7 +33,8 @@ module Daemonism
33
33
  :runtime_proc => nil,
34
34
  :cmdl_info => nil,
35
35
  :cmdl_parsing => true,
36
- :cmdl_operation => 'start'
36
+ :cmdl_operation => 'start',
37
+ :kill_amount => 1000
37
38
  }
38
39
 
39
40
  def daemonism(opts={},&block)
@@ -128,8 +129,14 @@ module Daemonism
128
129
  else
129
130
  puts "Server #{opts[:cmdl_info].nil? ? '' : '(' + opts[:cmdl_info].to_s + ') '}stopped"
130
131
  puts "Waiting while server goes down ..."
132
+ count = 0
131
133
  while status.call
132
- Process.kill "SIGTERM", pid
134
+ if count > opts[:kill_amount]
135
+ Process.kill "SIGKILL", pid
136
+ else
137
+ Process.kill "SIGTERM", pid
138
+ end
139
+ count += 1
133
140
  sleep 0.3
134
141
  end
135
142
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daemonite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler