daemon: break extracting myip down into smaller parts

This commit is contained in:
cn committed 2018-02-02 16:14:28 +01:00
1 parent 6080e14356
commit 08eaacb6ab
4 files changed
+53 -59

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ module Dyndnsd
out << "@ IN NS #{@dns}"
out << ""
zone['hosts'].each do |hostname,ips|
(ips.is_a?(Array) ? ips : [ips]).each do |ip|
ips.each do |ip|
ip = IPAddr.new(ip).native
type = ip.ipv6? ? "AAAA" : "A"
name = hostname.chomp('.' + @domain)