Exemple #1
0
func zoneConf() {
	dnsc.ApplyTemplate(
		"db.__XPNAME__.cypress.net",
		fmt.Sprintf("db.%s.cypress.net", rspec.Xpname),
		templateDir,
		rspec)
}
Exemple #2
0
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)
}
Exemple #3
0
func setupScript() {
	fn := "setup_dns.sh"
	dnsc.ApplyTemplate(fn, fn, templateDir, rspec)
	os.Chmod(fn, 0755)
}
Exemple #4
0
func keys() {
	dnsc.ApplyTemplate("keys.conf", "keys.conf", templateDir, rspec)
}
Exemple #5
0
func namedConfLocal() {
	dnsc.ApplyTemplate("named.conf.local", "named.conf.local", templateDir, rspec)
}
Exemple #6
0
func dnsKey() {
	dnsc.ApplyTemplate("dns.key", "dns.key", templateDir, cspec)
}
Exemple #7
0
func dnsPrivate() {
	dnsc.ApplyTemplate("dns.private", "dns.private", templateDir, cspec)
}
Exemple #8
0
func resolveConfHead() {
	dnsc.ApplyTemplate("resolve_conf_d_head", "head", templateDir, cspec)
}