diff --git a/main.go b/main.go index e7d333f06..63d946fb2 100644 --- a/main.go +++ b/main.go @@ -49,6 +49,7 @@ func main() { defer stop() var waitGroup sync.WaitGroup startControllers(&waitGroup, ctx) // start the api endpoint and mq and stun + startHooks() <-ctx.Done() waitGroup.Wait() } @@ -64,6 +65,14 @@ func setupConfig(absoluteConfigPath string) { } } +func startHooks() { + err := logic.TimerCheckpoint() + if err != nil { + logger.Log(1, "Timer error occurred: ", err.Error()) + } + logic.EnterpriseCheck() +} + func initialize() { // Client Mode Prereq Check var err error @@ -83,12 +92,6 @@ func initialize() { // Client Mode Prereq Check logic.SetJWTSecret() - err = logic.TimerCheckpoint() - if err != nil { - logger.Log(1, "Timer error occurred: ", err.Error()) - } - logic.EnterpriseCheck() - var authProvider = auth.InitializeAuthProvider() if authProvider != "" { logger.Log(0, "OAuth provider,", authProvider+",", "initialized")