func zoneConf() { dnsc.ApplyTemplate( "db.__XPNAME__.cypress.net", fmt.Sprintf("db.%s.cypress.net", rspec.Xpname), templateDir, rspec) }
func upfile() { out, _ := exec.Command("ip", "route", "get", cspec.NSaddr).Output() rx, _ := regexp.Compile("src\\s+(\\S+)") m := rx.FindStringSubmatch(string(out)) cspec.Addr = m[len(m)-1] dnsc.ApplyTemplate("upfile", "upfile", templateDir, cspec) }
func setupScript() { fn := "setup_dns.sh" dnsc.ApplyTemplate(fn, fn, templateDir, rspec) os.Chmod(fn, 0755) }
func keys() { dnsc.ApplyTemplate("keys.conf", "keys.conf", templateDir, rspec) }
func namedConfLocal() { dnsc.ApplyTemplate("named.conf.local", "named.conf.local", templateDir, rspec) }
func dnsKey() { dnsc.ApplyTemplate("dns.key", "dns.key", templateDir, cspec) }
func dnsPrivate() { dnsc.ApplyTemplate("dns.private", "dns.private", templateDir, cspec) }
func resolveConfHead() { dnsc.ApplyTemplate("resolve_conf_d_head", "head", templateDir, cspec) }