/
whistle_apps.erl
43 lines (35 loc) · 1.06 KB
/
whistle_apps.erl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
%%% @author James Aimonetti <james@2600hz.org>
%%% @copyright (C) 2010-2011, VoIP INC
%%% @doc
%%% WHISTLE_APPS logger
%%% @end
%%% Created : 8 Nov 2010 by James Aimonetti <james@2600hz.org>
-module(whistle_apps).
-author('James Aimonetti <james@2600hz.org>').
-export([start/0, start_link/0, stop/0]).
%% @spec start_link() -> {ok,Pid::pid()}
%% @doc Starts the app for inclusion in a supervisor tree
start_link() ->
start_deps(),
whistle_apps_sup:start_link().
%% @spec start() -> ok
%% @doc Start the callmgr server.
start() ->
start_deps(),
application:start(whistle_apps).
start_deps() ->
whistle_apps_deps:ensure(),
case application:get_env(reloader) of
{ok, true} -> reloader:start();
_ -> ok
end,
wh_util:ensure_started(sasl),
wh_util:ensure_started(crypto),
wh_util:ensure_started(ibrowse),
wh_util:ensure_started(riak_err),
wh_util:ensure_started(couchbeam),
wh_util:ensure_started(whistle_amqp).
%% @spec stop() -> ok
%% @doc Stop the whistle_apps server.
stop() ->
application:stop(whistle_apps).