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
e19ab5
index 1a35669..6b1531d 100644
f8bec4
--- a/src/rabbit.erl
f8bec4
+++ b/src/rabbit.erl
4e8069
@@ -280,6 +280,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,
f8bec4
     ok = log_broker_started(rabbit_plugins:active()).
f8bec4
 
f8bec4
 start_it(StartFun) ->