From 5469e5c3c861e8d55ca7ac50954e72b142139992 Mon Sep 17 00:00:00 2001
From: John Eckersberg <jeckersb@redhat.com>
Date: Wed, 18 Feb 2015 16:11:12 -0500
Subject: [PATCH] Add systemd notification support
---
src/rabbit.erl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/rabbit.erl b/src/rabbit.erl
index de51e658f..007b9fa6a 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -339,6 +339,11 @@ load_all_apps() ->
broker_start(Apps) ->
start_loaded_apps(Apps),
+ case code:load_file(sd_notify) of
+ {module, sd_notify} -> SDNotify = sd_notify,
+ SDNotify:sd_notify(0, "READY=1\nSTATUS=Initialized\nMAINPID=" ++ os:getpid() ++ "\n");
+ {error, _} -> ok
+ end,
ok = rabbit_lager:broker_is_started(),
ok = log_broker_started(rabbit_plugins:strictly_plugins(rabbit_plugins:active())).
--
2.21.0