%%% Copyright (c) 2014, NORDUnet A/S. %%% See LICENSE for licensing information. -module(plop_sup). -behaviour(supervisor). -export([start_link/1, init/1]). -export([start_in_shell/1]). start_link(Args) -> supervisor:start_link({local, ?MODULE}, ?MODULE, Args). %% For testing. start_in_shell(Args) -> {ok, Pid} = start_link(Args), unlink(Pid). %% Supervisor callback init(Args) -> {ok, {{one_for_one, 3, 10}, [{the_db, {db, start_link, []}, permanent, 10000, worker, [db]}, {fsync, {fsyncport, start_link, []}, permanent, 10000, worker, [fsyncport]}, {the_ht, {ht, start_link, []}, permanent, 10000, worker, [ht]}, {the_plop, {plop, start_link, Args}, % All arguments go to plop. permanent, 10000, % Shut down within 10s. worker, [plop]}]}}.