unified-push-xmpp/gateway/main.go

25 lines
465 B
Go
Raw Normal View History

2021-09-05 13:31:06 +02:00
package main
import (
2021-09-09 23:12:29 +02:00
"flag"
"dev.sum7.eu/genofire/golang-lib/file"
"github.com/bdlm/log"
2021-09-05 13:31:06 +02:00
)
func main() {
2021-09-09 23:12:29 +02:00
configPath := "config.toml"
flag.StringVar(&configPath, "c", configPath, "path to configuration file")
flag.Parse()
config := &XMPPService{}
if err := file.ReadTOML(configPath, config); err != nil {
log.Panicf("open config file: %s", err)
}
log.Info("startup")
if err := config.Run(); err != nil {
log.Errorf("startup xmpp: %v", err)
}
2021-09-05 13:31:06 +02:00
}