call UpdateDNS on node update if DNSOn

This commit is contained in:
Matthew R Kasun
2022-01-24 15:46:38 -05:00
parent cbc389c164
commit 1c69ee18c8
2 changed files with 15 additions and 3 deletions

View File

@@ -424,9 +424,9 @@ func UpdateWgInterface(file, privateKey, nameserver string, node models.Node) er
if node.Address6 != "" {
wireguard.Section(section_interface).Key("Address").SetValue(node.Address6)
}
if node.DNSOn == "yes" {
wireguard.Section(section_interface).Key("DNS").SetValue(nameserver)
}
//if node.DNSOn == "yes" {
// wireguard.Section(section_interface).Key("DNS").SetValue(nameserver)
//}
if node.PostUp != "" {
wireguard.Section(section_interface).Key("PostUp").SetValue(node.PostUp)
}