35 lines
465 B
Go
35 lines
465 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"mpbl3p/config"
|
|
"os"
|
|
"os/signal"
|
|
"syscall"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println("loading config...")
|
|
|
|
c, err := config.LoadConfig("config.ini")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
fmt.Println("building config...")
|
|
p, err := c.Build()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
fmt.Println("starting...")
|
|
p.Start()
|
|
|
|
fmt.Println("running")
|
|
|
|
signals := make(chan os.Signal)
|
|
signal.Notify(signals, syscall.SIGTERM, syscall.SIGINT)
|
|
|
|
<-signals
|
|
}
|