lxc-zone: handle SRV-records
This commit is contained in:
parent
acf532809a
commit
655cdbb427
@ -21,7 +21,6 @@ def atomic_write(path, content)
|
||||
FileUtils.mv(temp_path, path)
|
||||
end
|
||||
|
||||
|
||||
class ZoneData
|
||||
def initialize(data)
|
||||
@data = data
|
||||
@ -59,6 +58,7 @@ class RdnsData
|
||||
end
|
||||
end
|
||||
|
||||
def main
|
||||
json = JSON.load(File.open(CONTAINER_DATA))
|
||||
json["zone"]["serial"] += 1
|
||||
|
||||
@ -82,3 +82,6 @@ atomic_write(v6_rdns_path, v6_rdns_zone)
|
||||
atomic_write(CONTAINER_DATA, JSON.pretty_generate(json))
|
||||
|
||||
system("lxc-attach", "-e", "-n", DNS_CONTAINER, "--", "rec_control", "reload-zones")
|
||||
end
|
||||
|
||||
main
|
||||
|
@ -10,6 +10,9 @@
|
||||
<% if value["cname"] -%>
|
||||
<%= name %> CNAME <%= value["cname"] %>
|
||||
<% end -%>
|
||||
<% if value["srv"] -%>
|
||||
<%= name %> SRV <%= value["srv"] %>
|
||||
<% end -%>
|
||||
<% if value["ipv4"] -%>
|
||||
<%= name %> A <%= ip(value["ipv4"]) %>
|
||||
ipv4.<%= name %> A <%= ip(value["ipv4"]) %>
|
||||
|
Loading…
Reference in New Issue
Block a user