diff --git a/pkg/daemon/daemon.go b/pkg/daemon/daemon.go index 741e223..c652965 100644 --- a/pkg/daemon/daemon.go +++ b/pkg/daemon/daemon.go @@ -51,8 +51,15 @@ func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compress for { select { case err, _ := <-errorChannel: + err = rgbled.Red(rgbLEDs) + if err != nil { + logger.Error("Can not turn on red info light: %v", err) + } + logger.Error("%v", err) + time.Sleep(time.Second * 2) + case <-ticker: err := rgbled.Blue(rgbLEDs) if err != nil { @@ -63,6 +70,12 @@ func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compress err = logfile.AppendTemperatures(temperatureLogfile, compression, temperatureCache) if err != nil { + + err = rgbled.Red(rgbLEDs) + if err != nil { + logger.Error("Can not turn on red info light: %v", err) + } + cancel() logger.Fatal("Can not save temperatures: %v", err) }