1-module(rabbit_prelaunch_sup).
2-behaviour(supervisor).
3
4-export([start_link/0]).
5-export([init/1]).
6
7start_link() ->
8    supervisor:start_link({local, ?MODULE}, ?MODULE, []).
9
10init([]) ->
11    BootStateSup = #{id => bootstate,
12                     start => {rabbit_boot_state_sup, start_link, []},
13                     type => supervisor},
14    %% `rabbit_prelaunch` does not start a process, it only configures
15    %% the node.
16    Prelaunch = #{id => prelaunch,
17                  start => {rabbit_prelaunch, run_prelaunch_first_phase, []},
18                  restart => transient},
19    Procs = [BootStateSup, Prelaunch],
20    {ok, {#{strategy => one_for_one,
21            intensity => 1,
22            period => 5}, Procs}}.
23