From bd5c1cc302550e4caf8c3a6942f48a784f347b58 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 a2ca2d3e5..8996e0e83 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" @@ -1902,6 +1906,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