Skip to content

Commit

Permalink
Merge pull request #27 from NethServer/sdl-7103
Browse files Browse the repository at this point in the history
Add LDAP configuration script for user-domain-changed event NethServer/dev#7103
  • Loading branch information
stephdl authored Nov 22, 2024
2 parents c024ac9 + 115ade8 commit 14b0c39
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions imageroot/events/user-domain-changed/20configure_ldap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python3

#
# Copyright (C) 2023 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#

import json
import sys
import agent
import os

event = json.load(sys.stdin)

if event.get('domain') != os.getenv('LDAP_DOMAIN'):
exit(0)

agent.run_helper('systemctl', '--user', 'try-restart', 'sogo.service').check_returncode()

0 comments on commit 14b0c39

Please sign in to comment.