mirror of
https://github.com/h44z/wg-portal.git
synced 2025-08-13 08:42:24 +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
|
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
|
running := true
|
||||||
for running {
|
for running {
|
||||||
select {
|
select {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user