Files
lostakj 9db7aa2560
Build Docker image on push / docker (push) Successful in 22s
Initila commit
2026-08-18 00:46:59 +02:00

31 lines
627 B
Go

package main
import (
"context"
"flag"
"os"
"os/signal"
"syscall"
log "github.com/sirupsen/logrus"
"lostak.dev/shelly-exporter/application"
)
func main() {
var configPath string
flag.StringVar(&configPath, "config", "config.yaml", "Path to the YAML configuration file.")
flag.Parse()
app, err := application.New(configPath)
if err != nil {
log.Fatalf("Cannot initialize Shelly exporter: %v", err)
}
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
if err := app.Run(ctx); err != nil {
log.Fatalf("Shelly exporter stopped unexpectedly: %v", err)
}
}