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