2002-11-18 21:39:47 +01:00
|
|
|
%%%----------------------------------------------------------------------
|
|
|
|
%%% File : ejabberd.erl
|
|
|
|
%%% Author : Alexey Shchepin <alexey@sevcom.net>
|
|
|
|
%%% Purpose :
|
|
|
|
%%% Created : 16 Nov 2002 by Alexey Shchepin <alexey@sevcom.net>
|
|
|
|
%%% Id : $Id$
|
|
|
|
%%%----------------------------------------------------------------------
|
|
|
|
|
|
|
|
-module(ejabberd).
|
|
|
|
-author('alexey@sevcom.net').
|
|
|
|
-vsn('$Revision$ ').
|
|
|
|
|
2003-02-01 21:21:28 +01:00
|
|
|
-export([start/0, stop/0]).
|
2003-01-14 18:38:03 +01:00
|
|
|
|
2002-11-18 21:39:47 +01:00
|
|
|
start() ->
|
2003-02-01 21:21:28 +01:00
|
|
|
application:start(mnesia),
|
2003-02-06 20:09:22 +01:00
|
|
|
application:start(crypto),
|
|
|
|
application:start(ssl),
|
2003-02-01 21:21:28 +01:00
|
|
|
application:start(ejabberd).
|
2002-11-20 21:19:20 +01:00
|
|
|
|
2003-02-01 21:21:28 +01:00
|
|
|
stop() ->
|
|
|
|
application:stop(ejabberd).
|
2002-11-20 21:19:20 +01:00
|
|
|
|
2002-11-23 21:55:05 +01:00
|
|
|
|
2003-02-01 21:21:28 +01:00
|
|
|
%-include("ejabberd.hrl").
|
2003-01-22 21:40:40 +01:00
|
|
|
|
2003-02-01 21:21:28 +01:00
|
|
|
%start() ->
|
|
|
|
% spawn(?MODULE, init, []).
|
|
|
|
%
|
|
|
|
%init() ->
|
|
|
|
% register(ejabberd, self()),
|
|
|
|
% % Profiling
|
|
|
|
% %eprof:start(),
|
|
|
|
% %eprof:profile([self()]),
|
|
|
|
% %erlang:system_flag(fullsweep_after, 0),
|
|
|
|
% error_logger:logfile({open, ?ERROR_LOG_PATH}),
|
|
|
|
% randoms:start(),
|
|
|
|
% ok = erl_ddll:load_driver(".", expat_erl),
|
|
|
|
% Port = open_port({spawn, expat_erl}, [binary]),
|
|
|
|
% db_init(),
|
|
|
|
% sha:start(),
|
|
|
|
% translate:start(),
|
|
|
|
% acl:start(),
|
|
|
|
% gen_mod:start(),
|
|
|
|
% ejabberd_config:start(),
|
|
|
|
% ejabberd_auth:start(),
|
|
|
|
% ejabberd_router:start(),
|
|
|
|
% ejabberd_sm:start(),
|
|
|
|
% ejabberd_s2s:start(),
|
|
|
|
% ejabberd_local:start(),
|
|
|
|
% ejabberd_listener:start(),
|
|
|
|
% load_modules(),
|
|
|
|
% loop(Port).
|
|
|
|
%
|
|
|
|
%
|
|
|
|
%loop(Port) ->
|
|
|
|
% receive
|
|
|
|
% _ ->
|
|
|
|
% loop(Port)
|
|
|
|
% end.
|
|
|
|
%
|
|
|
|
%db_init() ->
|
|
|
|
% case mnesia:system_info(extra_db_nodes) of
|
|
|
|
% [] ->
|
|
|
|
% mnesia:create_schema([node()]);
|
|
|
|
% _ ->
|
|
|
|
% ok
|
|
|
|
% end,
|
|
|
|
% mnesia:start(),
|
|
|
|
% mnesia:wait_for_tables(mnesia:system_info(local_tables), infinity).
|
|
|
|
%
|
|
|
|
%load_modules() ->
|
|
|
|
% case ejabberd_config:get_local_option(modules) of
|
|
|
|
% undefined ->
|
|
|
|
% ok;
|
|
|
|
% Modules ->
|
|
|
|
% lists:foreach(fun({Module, Args}) ->
|
|
|
|
% gen_mod:start_module(Module, Args)
|
|
|
|
% end, Modules)
|
|
|
|
% end.
|
2003-01-22 21:40:40 +01:00
|
|
|
|