Skip to content

feat: Add sd_notify support#2383

Open
provokateurin wants to merge 1 commit intostalwartlabs:mainfrom
provokateurin:feat/sd_notify
Open

feat: Add sd_notify support#2383
provokateurin wants to merge 1 commit intostalwartlabs:mainfrom
provokateurin:feat/sd_notify

Conversation

@provokateurin
Copy link
Copy Markdown

@provokateurin provokateurin commented Nov 7, 2025

Closes #283

Allows a systemd service to use Type=notify, so it's only considered ready once all the listeners are up.
Additionally I also added sd_notify Reloading support, so systemd knows when stalwart is reloading the config due to an API call to the management API.
See https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Options and https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html#Well-known%20assignments.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 7, 2025

CLA assistant check
All committers have signed the CLA.

@provokateurin
Copy link
Copy Markdown
Author

@mdecimus could you have a look at this? It's a pretty small but very useful feature.

@mdecimus
Copy link
Copy Markdown
Member

This needs to be gated as not everybody uses systemd or Linux. Also, see https://github.com/stalwartlabs/stalwart/blob/main/CONTRIBUTING.md as some contributions can't be accepted at this moment.

@provokateurin
Copy link
Copy Markdown
Author

Stalwart is currently not accepting external contributions, except for bug fixes and small, well-scoped changes

I would consider this change a very small and well-scoped change 🤔

IMO suppressing the errors functions well enough as gating, but I'll implement a proper check 👍

@provokateurin
Copy link
Copy Markdown
Author

Now a check for systemd support is in place.

@provokateurin
Copy link
Copy Markdown
Author

@mdecimus could you take another look?

@mdecimus
Copy link
Copy Markdown
Member

Sorry, this can't be merged now. I suggest to run your own custom build in the meantime.

@stappersg

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[enhancement]: systemd notify support

4 participants