summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <michael@novemberain.com>2015-02-26 12:09:55 +0300
committerMichael Klishin <michael@novemberain.com>2015-02-26 12:09:55 +0300
commitcda9634d2005284204ba347f08756f159e684b3d (patch)
tree0d3754ee2c4782d569590a5888a7edd874217e0c
parent3cf1d5bd0fffd535643245f7ae0cc1325c17461b (diff)
parentd4a78fefa56283bdf41044e2cb7b5daebb02fa0e (diff)
downloadrabbitmq-server-git-cda9634d2005284204ba347f08756f159e684b3d.tar.gz
Merge pull request #52 from jeckersb/sd_notify-for-upstream
Add systemd notification support
-rw-r--r--src/rabbit.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index ba78b1eee0..1e9733647e 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -335,6 +335,11 @@ broker_start() ->
Plugins = rabbit_plugins:setup(),
ToBeLoaded = Plugins ++ ?APPS,
start_apps(ToBeLoaded),
+ case code:load_file(sd_notify) of
+ {module, sd_notify} -> SDNotify = sd_notify,
+ SDNotify:sd_notify(0, "READY=1");
+ {error, _} -> ok
+ end,
ok = log_broker_started(rabbit_plugins:active()).
start_it(StartFun) ->