Linux: make davmail notify readyness to systemd#188
Conversation
|
The build fails on windows as |
| try { | ||
| Class.forName("davmail.util.SystemdNotify").getMethod("ready").invoke(null); | ||
| } catch (Exception e) { | ||
| LOGGER.warn("Running on a systemD host but could not notify reaydness."); |
There was a problem hiding this comment.
"Readiness" is misspelled here. Please fix.
Also, capitalizing the "d" in "systemd" is a bit unusual. Wikipedia refers to it as "systemd".
I suggest rephrasing the first part as "Running on a host with systemd" etc.
|
I think we need to consider a few different cases here (for Linux only).
I would argue that instead of trying to handle all the various cases, simply try to notify systemd. If it works, great. If it doesn't, then simply continue without any systemd special cases. The whole idea of checking for directories to see if systemd is used is bound to cause issues. If you really want to check, see if the environment variable The next step would then be to use the https://www.freedesktop.org/software/systemd/man/latest/sd_watchdog_enabled.html# |
|
My apologies for my comments arriving in bits and pieces. I unfortunately haven't had the time to sit down and think this through properly. If we are changing the I don't know enough about the various failure modes or why we wouldn't be able to notify systemd when run under it, but just to be friendly to the end user, I suggest bailing out with an informative error message. |
No description provided.