Skip to content

Commit

Permalink
Merge pull request #141 from NethServer/sdl-7103
Browse files Browse the repository at this point in the history
Fix event user-domain-changed NethServer/dev#7103
  • Loading branch information
stephdl authored Nov 25, 2024
2 parents 70cf181 + c27be1e commit 00e20f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions imageroot/events/user-domain-changed/20configure_ldap
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@ event = json.load(sys.stdin)
if event.get('domain') != os.getenv('POSTFIX_ORIGIN'):
exit(0)

if 'node' in event and str(event['node']) != os.getenv('NODE_ID'):
exit(0) # ignore event if the source is not in our node

agent.run_helper('systemctl', '--user', '-T', 'try-reload-or-restart', 'dovecot.service').check_returncode()
agent.run_helper('systemctl', '--user', '-T', 'try-reload-or-restart', 'dovecot.service', 'postfix.service').check_returncode()
3 changes: 2 additions & 1 deletion imageroot/systemd/user/postfix.service
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ ExecStart=/usr/bin/podman run \
${MAIL_POSTFIX_IMAGE}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/postfix.ctr-id -t 60
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/postfix.ctr-id
ExecReload=runagent /usr/bin/podman exec --env=POSTFIX_* %N reload-config
ExecReload=runagent discover-services
ExecReload=runagent /usr/bin/podman exec --env-file=discovery.env --env=POSTFIX_* %N reload-config
PIDFile=%t/postfix.pid
Type=forking
SyslogIdentifier=%N
Expand Down

0 comments on commit 00e20f1

Please sign in to comment.