mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
BIND: Warn if output directory does not exist. (#424)
This commit is contained in:
@@ -212,6 +212,11 @@ func (c *Bind) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correcti
|
||||
// Read foundRecords:
|
||||
foundRecords := make([]*models.RecordConfig, 0)
|
||||
var oldSerial, newSerial uint32
|
||||
|
||||
if _, err := os.Stat(c.directory); os.IsNotExist(err) {
|
||||
fmt.Printf("\nWARNING: BIND directory %q does not exist!\n", c.directory)
|
||||
}
|
||||
|
||||
zonefile := filepath.Join(c.directory, strings.Replace(strings.ToLower(dc.Name), "/", "_", -1)+".zone")
|
||||
foundFH, err := os.Open(zonefile)
|
||||
zoneFileFound := err == nil
|
||||
|
||||
Reference in New Issue
Block a user