internal/router: only do cleanup in cd mode on freebsd

This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2023-08-09 23:56:07 +07:00
1 parent c271896551
commit 774f07dd7f
2 files changed
+16 -4

No files matched your search

+2 -2
View File
@@ -283,13 +283,13 @@ func initCLI() {
rootCertPool = cp
}
p.onStarted = append(p.onStarted, func() {
mainLog.Load().Debug().Msg("router setup")
mainLog.Load().Debug().Msg("router setup on start")
if err := p.router.Setup(); err != nil {
mainLog.Load().Error().Err(err).Msg("could not configure router")
}
})
p.onStopped = append(p.onStopped, func() {
mainLog.Load().Debug().Msg("router cleanup")
mainLog.Load().Debug().Msg("router cleanup on stop")
if err := p.router.Cleanup(); err != nil {
mainLog.Load().Error().Err(err).Msg("could not cleanup router")
}