mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-15 00:50:25 +02:00
internal/router: only do cleanup in cd mode on freebsd
This commit is contained in:
committed by
Cuong Manh Le
parent
c271896551
commit
774f07dd7f
+2
-2
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user