From 91be8a1c1f0387c154ac839c54f8fdfbe2d3c3c5 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: 2016-01-04 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 7e72b9b84..19ee92b27 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 "ssh1.h" @@ -2052,6 +2056,11 @@ main(int ac, char **av) unsetenv("SSH_SIGSTOP"); } +#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