mirror of
https://github.com/h44z/wg-portal.git
synced 2025-08-12 08:12:23 +00:00
run initial LDAP sync on startup (#407)
This commit is contained in:
parent
1e9ee25e49
commit
37904f96fb
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user