diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2008-03-21 15:42:14 +0000 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2008-03-21 15:42:14 +0000 |
commit | 618af5e07addd5b8d3d514fe3fe2edb5dadfd332 (patch) | |
tree | ea0ab5f0c3bf010d04128c00357b2875e3afe500 /src/ejabberd.erl | |
parent | Rewrite io:format calls to loglevel macros (EJAB-555) (diff) |
Seek epam binary into priv/bin (EJAB-573)
SVN Revision: 1243
Diffstat (limited to 'src/ejabberd.erl')
-rw-r--r-- | src/ejabberd.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ejabberd.erl b/src/ejabberd.erl index 323b4c912..de2727ca0 100644 --- a/src/ejabberd.erl +++ b/src/ejabberd.erl @@ -28,7 +28,7 @@ -author('alexey@process-one.net'). -export([start/0, stop/0, - get_so_path/0]). + get_so_path/0, get_bin_path/0]). start() -> application:start(ejabberd). @@ -49,3 +49,16 @@ get_so_path() -> Path -> Path 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. |