Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-cloud / recipes-extended / rabbitmq / files / rabbitmq-server-0002-Add-systemd-notification-support.patch
1 From: John Eckersberg <jeckersb@redhat.com>
2 Date: Wed, 18 Feb 2015 16:11:12 -0500
3 Subject: [PATCH] Add systemd notification support
4
5
6 diff --git a/src/rabbit.erl b/src/rabbit.erl
7 index 32ff240..f9e8231 100644
8 --- a/src/rabbit.erl
9 +++ b/src/rabbit.erl
10 @@ -280,6 +280,11 @@ broker_start() ->
11      Plugins = rabbit_plugins:setup(),
12      ToBeLoaded = Plugins ++ ?APPS,
13      start_apps(ToBeLoaded),
14 +    case code:load_file(sd_notify) of
15 +        {module, sd_notify} -> SDNotify = sd_notify,
16 +                              SDNotify:sd_notify(0, "READY=1\nSTATUS=Initialized\nMAINPID=" ++ os:getpid() ++ "\n");
17 +        {error, _} -> ok
18 +    end,
19      ok = log_broker_started(rabbit_plugins:active()).
20  
21  start_it(StartFun) ->