From 29b20fd528856c3bf17bb79440143c454f9012fb Mon Sep 17 00:00:00 2001 From: dmurnane Date: Wed, 15 Jul 2020 06:29:26 -0400 Subject: [PATCH] Notify systemd on sentinel startup (#7168) Co-authored-by: Daniel Murnane (cherry picked from commit 9242ccf238cbed018eb3a7fa3a437618345dd52b) --- src/server.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server.c b/src/server.c index 1f794e4ed..9c2126bc0 100644 --- a/src/server.c +++ b/src/server.c @@ -5198,6 +5198,10 @@ int main(int argc, char **argv) { } else { InitServerLast(); sentinelIsRunning(); + if (server.supervised_mode == SUPERVISED_SYSTEMD) { + redisCommunicateSystemd("STATUS=Ready to accept connections\n"); + redisCommunicateSystemd("READY=1\n"); + } } /* Warning the user about suspicious maxmemory setting. */