mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-15 07:11:15 +00:00
run initial LDAP sync on startup (#407)
This commit is contained in:
@@ -463,6 +463,15 @@ func (m Manager) runLdapSynchronizationService(ctx context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// perform initial sync
|
||||
err := m.synchronizeLdapUsers(ctx, &cfg)
|
||||
if err != nil {
|
||||
slog.Error("failed to synchronize LDAP users", "provider", cfg.ProviderName, "error", err)
|
||||
} else {
|
||||
slog.Debug("initial LDAP user sync completed", "provider", cfg.ProviderName)
|
||||
}
|
||||
|
||||
// start periodic sync
|
||||
running := true
|
||||
for running {
|
||||
select {
|
||||
|
Reference in New Issue
Block a user