Blame rabbitmq-server-0002-Add-systemd-notification-support.patch

f8bec4
From: John Eckersberg <jeckersb@redhat.com>
f8bec4
Date: Wed, 18 Feb 2015 16:11:12 -0500
f8bec4
Subject: [PATCH] Add systemd notification support
f8bec4
f8bec4
f8bec4
diff --git a/src/rabbit.erl b/src/rabbit.erl
fb7e03
index efbf57319..c6821d80e 100644
f8bec4
--- a/src/rabbit.erl
f8bec4
+++ b/src/rabbit.erl
fb7e03
@@ -354,6 +354,11 @@ broker_start() ->
f8bec4
     Plugins = rabbit_plugins:setup(),
f8bec4
     ToBeLoaded = Plugins ++ ?APPS,
f8bec4
     start_apps(ToBeLoaded),
f8bec4
+    case code:load_file(sd_notify) of
f8bec4
+        {module, sd_notify} -> SDNotify = sd_notify,
f8bec4
+			       SDNotify:sd_notify(0, "READY=1\nSTATUS=Initialized\nMAINPID=" ++ os:getpid() ++ "\n");
f8bec4
+        {error, _} -> ok
f8bec4
+    end,
1d1d3c
     ok = rabbit_lager:broker_is_started(),
1d1d3c
     ok = log_broker_started(rabbit_plugins:strictly_plugins(rabbit_plugins:active())).
f8bec4