mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
* src/ejabberd_app.erl: Now possible to specify path to log file
via "EJABBERD_LOG_PATH" environment variable * src/translate.erl: Now possible to specify path to "msgs" directory via "EJABBERD_MSGS_PATH" environment variable * src/ejabberd.erl: Added get_so_path/0 function * src/ejabberd_app.erl: Use ejabberd:get_so_path/0 to load .so * src/mod_irc/iconv.erl: Likewise * src/stringprep/stringprep.erl: Likewise SVN Revision: 192
This commit is contained in:
parent
a22d1851cc
commit
91aeaae9a5
@ -10,7 +10,8 @@
|
||||
-author('alexey@sevcom.net').
|
||||
-vsn('$Revision$ ').
|
||||
|
||||
-export([start/0, stop/0]).
|
||||
-export([start/0, stop/0,
|
||||
get_so_path/0]).
|
||||
|
||||
start() ->
|
||||
application:start(ejabberd).
|
||||
@ -19,3 +20,10 @@ stop() ->
|
||||
application:stop(ejabberd).
|
||||
|
||||
|
||||
get_so_path() ->
|
||||
case os:getenv("EJABBERD_SO_PATH") of
|
||||
false ->
|
||||
".";
|
||||
Path ->
|
||||
Path
|
||||
end.
|
||||
|
@ -51,9 +51,15 @@ init() ->
|
||||
register(ejabberd, self()),
|
||||
%erlang:system_flag(fullsweep_after, 0),
|
||||
%error_logger:logfile({open, ?LOG_PATH}),
|
||||
error_logger:add_report_handler(ejabberd_logger_h, ?LOG_PATH),
|
||||
LogPath = case os:getenv("EJABBERD_LOG_PATH") of
|
||||
false ->
|
||||
".";
|
||||
Path ->
|
||||
Path
|
||||
end,
|
||||
error_logger:add_report_handler(ejabberd_logger_h, LogPath),
|
||||
%timer:apply_interval(3600000, ?MODULE, dump_ports, []),
|
||||
ok = erl_ddll:load_driver(".", expat_erl),
|
||||
ok = erl_ddll:load_driver(ejabberd:get_so_path(), expat_erl),
|
||||
Port = open_port({spawn, expat_erl}, [binary]),
|
||||
loop(Port).
|
||||
|
||||
|
@ -18,7 +18,13 @@
|
||||
|
||||
start() ->
|
||||
ets:new(translations, [named_table, public]),
|
||||
load_dir(?MSGS_DIR),
|
||||
Dir = case os:getenv("EJABBERD_MSGS_PATH") of
|
||||
false ->
|
||||
?MSGS_DIR;
|
||||
Path ->
|
||||
Path
|
||||
end,
|
||||
load_dir(Dir),
|
||||
ok.
|
||||
|
||||
load_dir(Dir) ->
|
||||
|
Loading…
Reference in New Issue
Block a user