mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-02 16:37:52 +01:00
Seek epam binary into priv/bin (EJAB-573)
SVN Revision: 1241
This commit is contained in:
parent
dc37faf587
commit
6d7b71f13c
@ -1,3 +1,10 @@
|
|||||||
|
2008-03-21 Christophe Romain <christophe.romain@process-one.net>
|
||||||
|
|
||||||
|
* src/pam/epam.erl: Seek epam binary into priv/bin (EJAB-573)
|
||||||
|
* src/ejabberd.erl: Likewise
|
||||||
|
* src/ejabberdctl.template: Likewise
|
||||||
|
* tools/ejabberdctl: Likewise
|
||||||
|
|
||||||
2008-03-21 Badlop <badlop@process-one.net>
|
2008-03-21 Badlop <badlop@process-one.net>
|
||||||
|
|
||||||
* src/cyrsasl_digest.erl: Rewrite io:format calls to loglevel
|
* src/cyrsasl_digest.erl: Rewrite io:format calls to loglevel
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
-author('alexey@process-one.net').
|
-author('alexey@process-one.net').
|
||||||
|
|
||||||
-export([start/0, stop/0,
|
-export([start/0, stop/0,
|
||||||
get_so_path/0]).
|
get_so_path/0, get_bin_path/0]).
|
||||||
|
|
||||||
start() ->
|
start() ->
|
||||||
application:start(ejabberd).
|
application:start(ejabberd).
|
||||||
@ -49,3 +49,16 @@ get_so_path() ->
|
|||||||
Path ->
|
Path ->
|
||||||
Path
|
Path
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
get_bin_path() ->
|
||||||
|
case os:getenv("EJABBERD_BIN_PATH") of
|
||||||
|
false ->
|
||||||
|
case code:priv_dir(ejabberd) of
|
||||||
|
{error, _} ->
|
||||||
|
".";
|
||||||
|
Path ->
|
||||||
|
filename:join([Path, "bin"])
|
||||||
|
end;
|
||||||
|
Path ->
|
||||||
|
Path
|
||||||
|
end.
|
||||||
|
@ -45,6 +45,7 @@ ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES"
|
|||||||
EJABBERD_EBIN=$ROOTDIR/var/lib/ejabberd/ebin
|
EJABBERD_EBIN=$ROOTDIR/var/lib/ejabberd/ebin
|
||||||
EJABBERD_MSGS_PATH=$ROOTDIR/var/lib/ejabberd/priv/msgs
|
EJABBERD_MSGS_PATH=$ROOTDIR/var/lib/ejabberd/priv/msgs
|
||||||
EJABBERD_SO_PATH=$ROOTDIR/var/lib/ejabberd/priv/lib
|
EJABBERD_SO_PATH=$ROOTDIR/var/lib/ejabberd/priv/lib
|
||||||
|
EJABBERD_BIN_PATH=$ROOTDIR/var/lib/ejabberd/priv/bin
|
||||||
EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
|
EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
|
||||||
SASL_LOG_PATH=$LOGS_DIR/sasl.log
|
SASL_LOG_PATH=$LOGS_DIR/sasl.log
|
||||||
DATETIME=`date "+%Y%m%d-%H%M%S"`
|
DATETIME=`date "+%Y%m%d-%H%M%S"`
|
||||||
@ -57,6 +58,7 @@ export EJABBERD_CONFIG_PATH
|
|||||||
export EJABBERD_MSGS_PATH
|
export EJABBERD_MSGS_PATH
|
||||||
export EJABBERD_LOG_PATH
|
export EJABBERD_LOG_PATH
|
||||||
export EJABBERD_SO_PATH
|
export EJABBERD_SO_PATH
|
||||||
|
export EJABBERD_BIN_PATH
|
||||||
export ERL_CRASH_DUMP
|
export ERL_CRASH_DUMP
|
||||||
export ERL_INETRC
|
export ERL_INETRC
|
||||||
export ERL_MAX_PORTS
|
export ERL_MAX_PORTS
|
||||||
|
@ -79,7 +79,7 @@ acct_mgmt(Srv, User) when is_list(Srv), is_list(User) ->
|
|||||||
%% gen_server callbacks
|
%% gen_server callbacks
|
||||||
%%====================================================================
|
%%====================================================================
|
||||||
init([]) ->
|
init([]) ->
|
||||||
FileName = filename:join(ejabberd:get_so_path(), "epam"),
|
FileName = filename:join(ejabberd:get_bin_path(), "epam"),
|
||||||
case file:read_file_info(FileName) of
|
case file:read_file_info(FileName) of
|
||||||
{ok, Info} ->
|
{ok, Info} ->
|
||||||
Mode = Info#file_info.mode band 16#801,
|
Mode = Info#file_info.mode band 16#801,
|
||||||
|
@ -13,6 +13,7 @@ export EJABBERD_LOG_PATH=$ROOTDIR/ejabberd.log
|
|||||||
export EJABBERD_CONFIG_PATH=$ROOTDIR/ejabberd.cfg
|
export EJABBERD_CONFIG_PATH=$ROOTDIR/ejabberd.cfg
|
||||||
export EJABBERD_MSGS_PATH=$ROOTDIR/src/msgs
|
export EJABBERD_MSGS_PATH=$ROOTDIR/src/msgs
|
||||||
export EJABBERD_SO_PATH=$ROOTDIR/src
|
export EJABBERD_SO_PATH=$ROOTDIR/src
|
||||||
|
export EJABBERD_BIN_PATH=$ROOTDIR/src
|
||||||
export ERL_MAX_PORTS=32000
|
export ERL_MAX_PORTS=32000
|
||||||
|
|
||||||
[ -d $EJABBERD_DB ] || mkdir -p $EJABBERD_DB
|
[ -d $EJABBERD_DB ] || mkdir -p $EJABBERD_DB
|
||||||
|
Loading…
Reference in New Issue
Block a user