diff options
author | Jan Huwald <jh@sotun.de> | 2012-06-04 12:43:43 (GMT) |
---|---|---|
committer | Jan Huwald <jh@sotun.de> | 2012-06-04 12:43:43 (GMT) |
commit | f33aa706efbcfd0663a9bda060972081ea47e8f4 (patch) | |
tree | 7a7cccbc998517bdef4e787495c46112e3540276 /ereproxy.erl |
Initial commit
Diffstat (limited to 'ereproxy.erl')
-rw-r--r-- | ereproxy.erl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ereproxy.erl b/ereproxy.erl new file mode 100644 index 0000000..487aeda --- /dev/null +++ b/ereproxy.erl @@ -0,0 +1,28 @@ +-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]]}}. |