single binary -- coredns also tries to parse arguments, it kills itself on unknown flags

This commit is contained in:
Eugene Bujak 2018-10-12 04:05:21 +03:00
parent 7ff89baf45
commit ac6e0add31

5
app.go
View File

@ -109,6 +109,11 @@ func main() {
}
}
// eat all args so that coredns can start happily
if len(os.Args) > 1 {
os.Args = os.Args[:1]
}
err := writeConfig()
if err != nil {
log.Fatal(err)