diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-03-09 15:39:38 -0500 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-08-18 14:24:57 -0400 |
commit | a1f345a2c0c88d22a97733c624b7857774fb4159 (patch) | |
tree | 043efe06f77fe52c3b379cf3cc838ed13421e268 /apps | |
parent | 940810853c4404176964f504f0a5fa41c56f2b23 (diff) |
trust VM to start our dependent apps
Diffstat (limited to 'apps')
-rw-r--r-- | apps/couch/src/couch_app.erl | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/apps/couch/src/couch_app.erl b/apps/couch/src/couch_app.erl index 232953d9..55906f82 100644 --- a/apps/couch/src/couch_app.erl +++ b/apps/couch/src/couch_app.erl @@ -18,19 +18,16 @@ -export([start/2, stop/1]). -start(_Type, DefaultIniFiles) -> - IniFiles = get_ini_files(DefaultIniFiles), - case start_apps([crypto, public_key, sasl, inets, oauth, ssl, ibrowse, mochiweb]) of - ok -> - couch_server_sup:start_link(IniFiles); - {error, Reason} -> - {error, Reason} - end. +start(_Type, _Args) -> + IniFiles = get_ini_files(), + couch_server_sup:start_link(IniFiles). stop(_) -> ok. -get_ini_files(Default) -> +get_ini_files() -> + Etc = filename:join(code:root_dir(), "etc"), + Default = [filename:join(Etc,"default.ini"), filename:join(Etc,"local.ini")], case init:get_argument(couch_ini) of error -> Default; @@ -39,18 +36,3 @@ get_ini_files(Default) -> {ok, [Values]} -> Values end. - -start_apps([]) -> - ok; -start_apps([App|Rest]) -> - case application:start(App) of - ok -> - start_apps(Rest); - {error, {already_started, App}} -> - start_apps(Rest); - {error, _Reason} when App =:= public_key -> - % ignore on R12B5 - start_apps(Rest); - {error, _Reason} -> - {error, {app_would_not_start, App}} - end. |