mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-15 00:50:25 +02:00
all: wait NTP synced on Merlin
On some Merlin routers, the time is broken when system reboot, and need to wait for NTP synced to get the correct time. For fetching API in cd mode successfully, ctrld need to wait until NTP set the time correctly, otherwise, the certificate validation would complain.
This commit is contained in:
committed by
Cuong Manh Le
parent
d75f871541
commit
9689607409
@@ -173,6 +173,13 @@ func initCLI() {
|
||||
// Log config do not have thing to validate, so it's safe to init log here,
|
||||
// so it's able to log information in processCDFlags.
|
||||
initLogging()
|
||||
|
||||
if setupRouter {
|
||||
if err := router.PreStart(); err != nil {
|
||||
mainLog.Fatal().Err(err).Msg("failed to perform router pre-start check")
|
||||
}
|
||||
}
|
||||
|
||||
processCDFlags()
|
||||
if err := ctrld.ValidateConfig(validator.New(), &cfg); err != nil {
|
||||
mainLog.Fatal().Msgf("invalid config: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user