summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Lebedeff <alebedev@mirantis.com>2016-01-22 17:26:00 +0300
committerAlexey Lebedeff <alebedev@mirantis.com>2016-01-22 17:26:00 +0300
commitdbc910bdcd3a5ac47695a3d9c1375cc93fe943d4 (patch)
treea245b2b2c476515d5ec42da15f40d73e790a1023
parent76e19344a3cf75ab1c2f70b86a5f3f101592eceb (diff)
downloadrabbitmq-server-git-dbc910bdcd3a5ac47695a3d9c1375cc93fe943d4.tar.gz
Remove mentions of `sd_notify` library
Calling shell helper systemd_notify(1) is enough to do the same. Systemd unit file should specify `NotifyAccess=all`.
-rw-r--r--src/rabbit.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index fdebf81eef..b41813e55d 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -289,11 +289,10 @@ 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, _} -> os:cmd("systemd-notify --ready")
- end,
+ %% Only for systemd unit with Type=notify. Errors are intentionally
+ %% ignored: either you have working systemd-notify(1) or you don't
+ %% care about systemd at all.
+ os:cmd("systemd-notify --ready")
ok = log_broker_started(rabbit_plugins:active()).
start_it(StartFun) ->