From 08f579231cd38a1c657aaa6ddeb8ab57a1fd4f5c Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 3 Apr 2024 14:40:32 +1100 Subject: notify systemd on listen and reload Standalone implementation that does not depend on libsystemd. With assistance from Luca Boccassi, and feedback/testing from Colin Watson. bz2641 --- platform.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'platform.c') diff --git a/platform.c b/platform.c index 4fe8744ee..9cf818153 100644 --- a/platform.c +++ b/platform.c @@ -44,6 +44,14 @@ platform_pre_listen(void) #endif } +void +platform_post_listen(void) +{ +#ifdef SYSTEMD_NOTIFY + ssh_systemd_notify_ready(); +#endif +} + void platform_pre_fork(void) { @@ -55,6 +63,9 @@ platform_pre_fork(void) void platform_pre_restart(void) { +#ifdef SYSTEMD_NOTIFY + ssh_systemd_notify_reload(); +#endif #ifdef LINUX_OOM_ADJUST oom_adjust_restore(); #endif -- cgit v1.2.3