cool-dns/cmd/cooldns.go

25 lines
429 B
Go
Raw Normal View History

2021-01-31 21:31:08 +00:00
package main
import (
"flag"
"log"
"os"
"os/signal"
"syscall"
cooldns "git.kapelle.org/niklas/cool-dns/internal"
)
func main() {
configPath := flag.String("c", "/etc/cool-dns/config.yaml", "path to the config file")
flag.Parse()
cooldns.Start(*configPath)
sig := make(chan os.Signal)
signal.Notify(sig, syscall.SIGINT, syscall.SIGTERM)
s := <-sig
log.Printf("Signal (%v) received, stopping\n", s)
os.Exit(0)
}