-module(ereproxy). -behaviour(application). -behaviour(supervisor). -export([start/0, start/2, stop/1, init/1]). start() -> application:start(?MODULE, permanent). %%% application callbacks start(_Type, CfgMod) -> lists:map(fun(N) -> ok = application:start(N) end, [crypto, public_key, ssl]), supervisor:start_link(?MODULE, CfgMod). stop(_State) -> ok. %%% supervisor callbacks init(CfgMod) -> % return child spec {ok, {{one_for_one, 10, 3600}, [{Mod, {Mod, start_link, [CfgMod]}, permanent, brutal_kill, worker, [Mod]} || Mod <- [ereproxy_server, ereproxy_log]]}}.