Initial commit

This commit is contained in:
nemunaire 2023-11-12 21:25:57 +01:00
commit 5d0a210e6d
16 changed files with 998 additions and 0 deletions

34
main.go Normal file
View file

@ -0,0 +1,34 @@
package main
import (
"log"
"os"
"os/signal"
"syscall"
"git.nemunai.re/nemunaire/hathoris/config"
_ "git.nemunai.re/nemunaire/hathoris/sources/amp1_gpio"
_ "git.nemunai.re/nemunaire/hathoris/sources/mpv"
)
var (
Version = "custom-build"
)
func main() {
cfg, err := config.Consolidated()
if err != nil {
log.Fatal("Unable to read configuration:", err)
}
// Start app
a := NewApp(cfg)
go a.Start()
quit := make(chan os.Signal, 1)
signal.Notify(quit, os.Interrupt, syscall.SIGTERM)
<-quit
log.Println("Stopping the service...")
a.Stop()
log.Println("Stopped")
}