dns_one 0.4.55 → 0.4.56

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
  SHA1:
3
- metadata.gz: 557bdcc857a2c316de948f6d3dbf6fc6095ee3d3
4
- data.tar.gz: b97d7ec3457076e92952e83a9a54b0997062338c
3
+ metadata.gz: d7cfa42d5e5a79c82bacde06905ef3c377f7d526
4
+ data.tar.gz: 935dd60e6651e5feb036d76b532f4f8a7b986aa1
5
5
  SHA512:
6
- metadata.gz: cae9d5eb4dda526c2b406723ca99e5ee42bd20e3053abbf44a6301ab7b0bc99358065e954bdc4b142438617ff87653564e2c11c1a47cf96443d4b6cd631e8552
7
- data.tar.gz: 30676c2bcbad5289dd6f06f14146c069023f6be67ff8be473f69987155713cee4cb4c4f80e70d80e091de261ce9abe43c780835c76172ea2e9b674e4128681e4
6
+ metadata.gz: c8cd4635cf05862d3bc966b656002127653442f1ae30abe832fa6f2a48b33037aa6027a4a0ee3ecc87d85bed77d915721309556caeee715e4bfc3c55383be6a7
7
+ data.tar.gz: 379aae2b224c76303fac3b85b2d04ec08ab065c0e255eb76bfa65205fb9c059a81afce1878fa29b6253e8a90854dadd8b90b60cfe2a385b59c8b752ffe8f1a59
@@ -65,13 +65,16 @@ module DnsOne; module Backend; class HTTPBell < Base
65
65
  when :start
66
66
  @log_update_t0 = Time.now
67
67
  Log.i "update`ing..."
68
+ system "echo 'update`ing...' >> /tmp/ddf"
68
69
  when :end
69
70
  show_num = 10
70
71
  dots = '...' if recs.size > show_num
71
72
  zones = recs[0, show_num].map(&:last).join(', ')
72
73
  dt = '%.2f' % (Time.now - @log_update_t0)
74
+ system "echo '#{recs.size} zone(s) added in #{dt}s: #{zones}#{dots}' >> /tmp/ddf"
73
75
  Log.i "#{recs.size} zone(s) added in #{dt}s: #{zones}#{dots}"
74
76
  else
77
+ system "echo 'Wrong param #{point} for log_update' >> /tmp/ddf"
75
78
  Log.e "Wrong param #{point} for log_update"
76
79
  end
77
80
  end
@@ -83,15 +86,20 @@ module DnsOne; module Backend; class HTTPBell < Base
83
86
  require "socket"
84
87
  dts = TCPServer.new '0.0.0.0', @conf[:http_bell_port]
85
88
  allow_ips = @conf[:http_bell_allow_ips]
89
+ Log.i 'Starting bell listener...'
86
90
  Thread.new do
87
91
  loop do
88
92
  Thread.start(dts.accept) do |client|
89
- client.close
90
- if !allow_ips || allow_ips.include?(client.peeraddr)
93
+ Log.i 'accepted'
94
+ numeric_address = client.peeraddr[3]
95
+ if !allow_ips || allow_ips.include?(numeric_address)
96
+ Log.i 'will update'
91
97
  update
92
98
  else
93
- Log.w "Ignoring bell ring from #{client.peeraddr}."
99
+ Log.w "Ignoring bell ring from #{numeric_address}."
94
100
  end
101
+ Log.i 'closing connection'
102
+ client.close
95
103
  end
96
104
  end
97
105
  end
@@ -1,3 +1,3 @@
1
1
  module DnsOne
2
- VERSION = "0.4.55"
2
+ VERSION = "0.4.56"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dns_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.55
4
+ version: 0.4.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lobato