-module(plop_sup). -behaviour(supervisor). -export([start_link/1, init/1]). -export([start_in_shell/0]). start_link(Args) -> supervisor:start_link({local, ?MODULE}, ?MODULE, Args). %% For testing. start_in_shell() -> {ok, Pid} = start_link([]), unlink(Pid). %% Supervisor callback init(_Args) -> {ok, {{one_for_one, 3, 10}, [{the_plop, {plop, start_link, []}, % Here's where key file name and pass phrase go. permanent, 10000, % Shut down within 10s. worker, [plop]}, {the_db, {db, start_link, []}, permanent, 10000, worker, [db]} ]}}.