diff --git a/main.go b/main.go index c93fcb495..3f2350246 100644 --- a/main.go +++ b/main.go @@ -48,6 +48,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() } @@ -63,6 +64,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 @@ -82,12 +91,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")