aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2009-01-20 19:42:08 +0000
committerBadlop <badlop@process-one.net>2009-01-20 19:42:08 +0000
commit3e2048ace95f8b80ce43d77898f12f058b112e8b (patch)
tree45579888a7c6bd18700a57dc32aacce4187a05ad /src
parent* src/mod_privacy.erl: Only run roster_get_jid_info if privacy (diff)
* src/Makefile.in: The path to the installed copy of ejabberd
Guide is set in the environment variable EJABBERD_DOC_PATH (EJAB-837). * src/web/ejabberd_web_admin.erl: Likewise * src/ejabberdctl.template: Likewise * doc/guide.tex: Likewise * doc/guide.html: Likewise SVN Revision: 1835
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in1
-rw-r--r--src/ejabberdctl.template4
-rw-r--r--src/web/ejabberd_web_admin.erl8
3 files changed, 9 insertions, 4 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 8917df636..28c126826 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -172,6 +172,7 @@ install: all
-e "s*@LIBDIR@*@libdir@*" \
-e "s*@SYSCONFDIR@*@sysconfdir@*" \
-e "s*@LOCALSTATEDIR@*@localstatedir@*" \
+ -e "s*@DOCDIR@*@docdir@*" \
-e "s*@erl@*@ERL@*" ejabberdctl.template \
> ejabberdctl.example
[ -f $(ETCDIR)/ejabberdctl.cfg ] \
diff --git a/src/ejabberdctl.template b/src/ejabberdctl.template
index b71531c19..32a31d105 100644
--- a/src/ejabberdctl.template
+++ b/src/ejabberdctl.template
@@ -48,6 +48,9 @@ fi
if [ "$SPOOLDIR" = "" ] ; then
SPOOLDIR=@LOCALSTATEDIR@/lib/ejabberd
fi
+if [ "$EJABBERD_DOC_PATH" = "" ] ; then
+ EJABBERD_DOC_PATH=@DOCDIR@
+fi
# check the proper system user is used
ID=`id -g`
@@ -99,6 +102,7 @@ export EJABBERD_MSGS_PATH
export EJABBERD_LOG_PATH
export EJABBERD_SO_PATH
export EJABBERD_BIN_PATH
+export EJABBERD_DOC_PATH
export ERL_CRASH_DUMP
export ERL_INETRC
export ERL_MAX_PORTS
diff --git a/src/web/ejabberd_web_admin.erl b/src/web/ejabberd_web_admin.erl
index ea1a936eb..832983914 100644
--- a/src/web/ejabberd_web_admin.erl
+++ b/src/web/ejabberd_web_admin.erl
@@ -41,9 +41,9 @@
process(["doc", LocalFile], _Request) ->
- DocPath = case ejabberd_config:get_global_option(doc_path) of
+ DocPath = case os:getenv("EJABBERD_DOC_PATH") of
P when is_list(P) -> P;
- _ -> "/share/doc/ejabberd/"
+ false -> "/share/doc/ejabberd/"
end,
%% Code based in mod_http_fileserver
FileName = filename:join(DocPath, LocalFile),
@@ -55,8 +55,8 @@ process(["doc", LocalFile], _Request) ->
FileContents};
{error, Error} ->
?DEBUG("Delivering error: ~p", [Error]),
- Help = " " ++ FileName ++ " - Try to specify the path to ejabberd guide.html "
- "with the option doc_path. Check the ejabberd Guide for more information",
+ Help = " " ++ FileName ++ " - Try to specify the path to ejabberd documentation "
+ "with the environment variable EJABBERD_DOC_PATH. Check the ejabberd Guide for more information.",
case Error of
eacces -> {403, [], "Forbidden"++Help};
enoent -> {404, [], "Not found"++Help};