amnesie 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7406851da95a1f380d2ad273a5386ecaf28fd6695347b5891d5dcba27bef4f81
4
- data.tar.gz: e8ebf031381c63faa622524cca82164ea738efadcabdb88adea7b9aef0e702ec
3
+ metadata.gz: 81455c8939114e8211b6c21844ad35e88d0422c29be33d36cafff2ea5210bfa6
4
+ data.tar.gz: 6dcc45de41fbfbf84b3e6f4a0af45fe139af8296ce5a444ecc3e4d5997baf243
5
5
  SHA512:
6
- metadata.gz: fb59d06668aca29674020a415570dfee42df193facddc1b8dde571ffcf2ea24731dd359ea5e2624b6441956d159b3be0bc81363e73ef814fb6faa0e852f698dc
7
- data.tar.gz: 914d52375535c0bdb3e0e5861e646d13d1b18e891d7c3e5e17018b94aa4fc5f9a07852efde1b940db7433b8c2be06118930fd4f43a12e35d76a30ecc3ba2123f
6
+ metadata.gz: bc53a51bed717b6e931d35d0a1e19ba45c8b6ee250a811ed08e5956e6f64c419167112e1329f32019b0fa0204e0b98fc8ebb9d16f368923b959d45504769591c
7
+ data.tar.gz: 4a78f282cc125ce8dd2e7248ebfa9b3126dcff206a257a04157f7d01582728944fcdf0da62638dc16e079e700055b657bad0c043eef3d175e887d610552db288
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.0.4, release 2020-05-16
2
+ * Debian10 need to reload ifup@card-name too
3
+ * Correct path where search dhclient (/bin,/sbin)
4
+ * Enhance stuff for kill and reload dhclient (tested on debian 10)
5
+
1
6
  ## 0.0.3, release 2020-05-15
2
7
  * Add stuff for kill and reload dhclient (tested on debian 10)
3
8
 
data/amnesie.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "amnesie"
3
- s.version = "0.0.3"
3
+ s.version = "0.0.4"
4
4
  s.summary = "A tool to make your computer amnesic"
5
5
  s.description = <<-EOF
6
6
  A tool to make your computer amnesic"
@@ -31,7 +31,7 @@ module Amnesie
31
31
  end
32
32
 
33
33
  def kill_dhclient
34
- return if not TTY::Which.exist?('dhclient')
34
+ return if not TTY::Which.exist?('dhclient', paths: ['/bin, /sbin'])
35
35
  `pgrep -x dhclient`
36
36
  @pkill.run("dhclient") if $?.success?
37
37
  @rm.run("/run/dhclient.#{@card}.pid") if File.exist? "/run/dhclient.#{@card}.pid"
@@ -51,10 +51,14 @@ module Amnesie
51
51
  end
52
52
 
53
53
  def restart_dhclient
54
- return if not TTY::Which.exist?('dhclient')
54
+ return if not TTY::Which.exist?('dhclient', paths: ['/bin, /sbin'])
55
55
  dhclient = Helpers::Exec.new("dhclient")
56
56
  # command tested on debian, not try on another system yet...
57
57
  dhclient.run("-4 -v -i -pf /run/dhclient.#{@card}.pid -lf /var/lib/dhcp/dhclient.#{@card}.leases -I -df /var/lib/dhcp/dhclient6.#{@card}.leases #{@card}")
58
+ if TTY::Which.exist?('systemctl')
59
+ `systemctl is-active ifup@#{@card}`
60
+ @systemctl.run("restart ifup@#{@card}") if $?.success?
61
+ end
58
62
  puts "Restarted dhclient"
59
63
  end
60
64
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amnesie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - szorfein
metadata.gz.sig CHANGED
Binary file