func FindServices() []model.Service { services := readServiceFiles(configuration.C.Paths.Services) if len(services) < 1 { log.Panic("No services found! This makes me useless! Panic!") } return services }
func readFile(path string) []byte { raw, err := ioutil.ReadFile(path) if err != nil { log.Panic("Cannot read file: ", path, err.Error()) } return raw }
//Boot handles flags and initializes configuration func Boot() { configuration.Init(config) configuration.Debug = debug configuration.AutoStart = autoStart if testConfig { err := TestConfiguration() if err != nil { log.Panic(err) } else { os.Exit(0) } } if noActionHandling { configuration.C.NoActionHandling = true } if configuration.AutoStart { daemon.Start() } daemon.Spawn() }