Ignoe derp.yaml, don't panic in Serve()

This commit is contained in:
Eugen 2021-12-01 19:32:47 +01:00
parent 07a437c707
commit 7e95b3501d
2 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View file

@ -17,6 +17,7 @@
/headscale
config.json
config.yaml
derp.yaml
*.key
/db.sqlite
*.sqlite3

6
app.go
View file

@ -418,12 +418,12 @@ func (h *Headscale) Serve() error {
err = h.ensureUnixSocketIsAbsent()
if err != nil {
panic(err)
return err
}
socketListener, err := net.Listen("unix", h.cfg.UnixSocket)
if err != nil {
panic(err)
return err
}
// Handle common process-killing signals so we can gracefully shut down:
@ -441,7 +441,7 @@ func (h *Headscale) Serve() error {
networkListener, err := net.Listen("tcp", h.cfg.Addr)
if err != nil {
panic(err)
return err
}
// Create the cmux object that will multiplex 2 protocols on the same port.