Commit 5ea1baff authored by Dmitry Volodin's avatar Dmitry Volodin

Fix rndc reload on new zones

parent e6a9d567
Pipeline #9721 failed with stages
in 4 minutes and 6 seconds
......@@ -101,12 +101,13 @@ func (c *BindDNSSync) GetZonePath(name string) string {
// Apply changes
func (c *BindDNSSync) ApplyChanges() error {
isDirty := c.Inventory.IsDirty
err := c.Inventory.Save()
if err != nil {
return fmt.Errorf("Failed to apply changes: %s", err)
}
if !c.NoApply {
if c.Inventory.IsDirty {
if isDirty {
// Include changed, reload all configuration
cmd := exec.Command("rndc", "reload")
err = cmd.Run()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment