diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2016-01-27 11:51:16 +0100 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2016-01-27 11:51:16 +0100 |
| commit | 5dfd117a18355ae71b7ec7d389cc8e7a45516aa9 (patch) | |
| tree | 8c9f7fc921590d0c85160af1a8c8e45621e884b2 /src | |
| parent | 44cd71d1a4eefdb3607a01d183908aec6cffc8cb (diff) | |
| download | rabbitmq-server-git-5dfd117a18355ae71b7ec7d389cc8e7a45516aa9.tar.gz | |
rabbit.erl: Do not run systemd-notify on Windows
This silences a warning logged during RabbitMQ startup.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit.erl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 6044bcc663..81c7eee580 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -284,10 +284,13 @@ 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") + case os:type() of + {win32, _} -> ok; + _ -> 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 end, ok = log_broker_started(rabbit_plugins:active()). |
