summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexey Lebedeff <alebedev@mirantis.com>2016-01-22 16:28:57 +0300
committerAlexey Lebedeff <alebedev@mirantis.com>2016-01-22 16:46:47 +0300
commit466dea8ba68f5687eb8e2dfb90d06f94ce3ac3ee (patch)
tree44ed52692902d42f92a53a9438b0cda96ff64cf1 /src
parent116f9bd449abee8d0d4dbc920bb3896efce86882 (diff)
downloadrabbitmq-server-git-466dea8ba68f5687eb8e2dfb90d06f94ce3ac3ee.tar.gz
Use systemd-notify(1) shell helper as fallback
Currently external erlang library `sd_notify` is used to make systemd unit with `Type=notify` to work correctly. This library contains some C code and thus cannot be built into architecture-independent package. But it is not actually needed, as systemd provides systemd-notify(1) helper for shell scripts which serves exactly the same purpose. The only thing is that you need to add `NotifyAccess=all` to your unit file to make everything work well.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 1c4480b3e7..6044bcc663 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -287,7 +287,7 @@ broker_start() ->
case code:load_file(sd_notify) of
{module, sd_notify} -> SDNotify = sd_notify,
SDNotify:sd_notify(0, "READY=1");
- {error, _} -> ok
+ {error, _} -> os:cmd("systemd-notify --ready")
end,
ok = log_broker_started(rabbit_plugins:active()).