Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SystemD Type=notify #456

Merged
merged 4 commits into from
May 28, 2024
Merged

Support SystemD Type=notify #456

merged 4 commits into from
May 28, 2024

Conversation

Deric-W
Copy link
Contributor

@Deric-W Deric-W commented May 25, 2024

By compiling with the optional feature systemd the service representing the push server can be configured with Type=notify.

This allows actions depending on the service being operational (like occ notify_push:setup) to be delayed until things like connections or Unix domain sockets have been established.

The following things might be debatable:

  • using an external dependency for notifying SystemD

  • notifying SystemD in a blocking manner from within a future

Closes #452

This requires the optional feature `systemd` to be enabled and allows
the startup of units depending on e.g. Unix domain sockets to be delayed
until these are created.

Signed-off-by: Eric Wolf <robo-eric@gmx.de>
@icewind1991
Copy link
Member

If I understand the sd-notify library correctly. If we ignore any error from sending the notification, there shouldn't be any issue with trying to send the notification on non-systemd systems and having the feature enabled by default.

@Deric-W
Copy link
Contributor Author

Deric-W commented May 27, 2024

When the required environment variable is not present the function just returns Ok(()) which means we don't have to ignore errors.

Deric-W and others added 3 commits May 27, 2024 21:33
Signed-off-by: Eric Wolf <robo-eric@gmx.de>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 merged commit 83ad1ac into nextcloud:main May 28, 2024
63 checks passed
Copy link

github-actions bot commented Jun 8, 2024

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

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

Successfully merging this pull request may close these issues.

Support SystemD Type=notify
2 participants