PKGBUILD/pkg/daemon/daemon.go

27 lines
688 B
Go

package daemon
import (
"github.com/volker-raschek/flucky/pkg/config"
)
// Start the daemon
func Start(cnf *config.Configuration) error {
// interrupt := make(chan os.Signal, 1)
// signal.Notify(interrupt, os.Interrupt, os.Kill, syscall.SIGTERM)
// humidityChannel := make(chan *types.Humidity)
// temperatureChannel := make(chan *types.Temperature)
// go sensor.ReadHumiditiesContinuously(humiditySensors, humidityChannel)
// go sensor.ReadTemperaturesContinuously(temperatureSensors, temperatureChannel)
// for {
// select {
// case killSignal := <-interrupt:
// return fmt.Errorf("Daemon was interruped by system signal %v", killSignal)
// }
// }
return nil
}