From e8453621b2a26f8d6afec405ff60201749b01e5e Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 21 Dec 2015 16:08:47 +0000 Subject: Add systemd readiness notification support Bug-Debian: https://bugs.debian.org/778913 Forwarded: no Last-Update: 2017-08-22 Patch-Name: systemd-readiness.patch --- sshd.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sshd.c') diff --git a/sshd.c b/sshd.c index 50f2726bf..fb9b7b7fb 100644 --- a/sshd.c +++ b/sshd.c @@ -85,6 +85,10 @@ #include #endif +#ifdef HAVE_SYSTEMD +#include +#endif + #include "xmalloc.h" #include "ssh.h" #include "ssh2.h" @@ -2076,6 +2080,11 @@ main(int ac, char **av) } } +#ifdef HAVE_SYSTEMD + /* Signal systemd that we are ready to accept connections */ + sd_notify(0, "READY=1"); +#endif + /* Accept a connection and return in a forked child */ server_accept_loop(&sock_in, &sock_out, &newsock, config_s); -- cgit v1.2.3