hooks/update-zone: add command to reload pdns-recursor zones
This commit is contained in:
parent
4ad6fa387f
commit
1e67ccaf9d
@ -12,7 +12,6 @@ CONTAINER_DATA = LXC_ROOT.join("container.json")
|
||||
LXC_ZONE = ZONE_PATH.join("lxc.zone")
|
||||
DNS_CONTAINER = "dns"
|
||||
|
||||
|
||||
def atomic_write(path, content)
|
||||
temp_path = path.to_s + ".tmp"
|
||||
File.open(temp_path, 'w+') do |f|
|
||||
@ -82,4 +81,4 @@ atomic_write(v4_rdns_path, v4_rdns_zone)
|
||||
atomic_write(v6_rdns_path, v6_rdns_zone)
|
||||
atomic_write(CONTAINER_DATA, JSON.pretty_generate(json))
|
||||
|
||||
system("lxc-attach", "-n", DNS_CONTAINER, "--", "rndc", "reload")
|
||||
system("lxc-attach", "-e", "-n", DNS_CONTAINER, "--", "rec_control", "reload-zones")
|
||||
|
Loading…
Reference in New Issue
Block a user