Esempio n. 1
0
func main() {
	flag.Parse()
	if len(sampleConfigFilPath) == 0 {
		log.Println("All arguments are mandatory!")
		flag.PrintDefaults()
		return
	}

	configFilePath := filepath.Join(filepath.Dir(sampleConfigFilPath), "shelter.conf")
	keysPath := filepath.Join(filepath.Dir(sampleConfigFilPath), "keys")
	conf.Run(configFilePath, sampleConfigFilPath, keysPath)
}
Esempio n. 2
0
// Unix like systems that uses debian packages cannot pass arguments in post intall script calls, so
// we are going to put it hard coded
func main() {
	sampleConfigFilPath := "/usr/shelter/etc/shelter.conf.unix.sample"
	configFilePath := filepath.Join(filepath.Dir(sampleConfigFilPath), "shelter.conf")
	keysPath := filepath.Join(filepath.Dir(sampleConfigFilPath), "keys")
	conf.Run(configFilePath, sampleConfigFilPath, keysPath)
}