]> granicus.if.org Git - ejabberd/commitdiff
* src/Makefile.in: The path to the installed copy of ejabberd
authorBadlop <badlop@process-one.net>
Tue, 20 Jan 2009 19:42:08 +0000 (19:42 +0000)
committerBadlop <badlop@process-one.net>
Tue, 20 Jan 2009 19:42:08 +0000 (19:42 +0000)
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

ChangeLog
doc/guide.html
doc/guide.tex
src/Makefile.in
src/ejabberdctl.template
src/web/ejabberd_web_admin.erl

index 48e3bf426d8f11cb708d5a9bb18906cc6b8106f7..93772026d8a37f26999294aa654a16e6c1a88f99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2009-01-20  Badlop  <badlop@process-one.net>
 
+       * 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
+
        * src/mod_privacy.erl: Only run roster_get_jid_info if privacy
        list has subscription or group (thanks to George Hazan)(EJAB-851).
        Sort items in privacy list by order before storing (EJAB-848)
index 3282fc3d8dbe1e62ec33a2718a2ea90ec88dc753..5bf0b4a26aa0a9a7d94cafd3eac2a8ad9b8f9ed3 100644 (file)
@@ -476,7 +476,7 @@ variable.
 </P></LI><LI CLASS="li-enumerate">Install OpenSSL in <CODE>C:\sdk\OpenSSL</CODE> and add <CODE>C:\sdk\OpenSSL\lib\VC</CODE> to your path or copy the binaries to your system directory.
 </LI><LI CLASS="li-enumerate">Install ZLib in <CODE>C:\sdk\gnuWin32</CODE>. Copy
 <CODE>C:\sdk\GnuWin32\bin\zlib1.dll</CODE> to your system directory. If you change your path it should already be set after libiconv install.
-</LI><LI CLASS="li-enumerate">Make sure the you can access Erlang binaries from your path. For example: <CODE>set PATH=%PATH%;"C:\sdk\erl5.5.5\bin"</CODE>
+</LI><LI CLASS="li-enumerate">Make sure the you can access Erlang binaries from your path. For example: <CODE>set PATH=%PATH%;"C:\sdk\erl5.6.5\bin"</CODE>
 </LI><LI CLASS="li-enumerate">Depending on how you end up actually installing the library you might need to check and tweak the paths in the file configure.erl.
 </LI><LI CLASS="li-enumerate">While in the directory <CODE>ejabberd\src</CODE> run:
 <PRE CLASS="verbatim">configure.bat
@@ -914,8 +914,8 @@ connected to port 5237 with password &#X2018;<TT>ggsecret</TT>&#X2019;.
 {s2s_default_policy, deny}.
 {{s2s_host,"jabber.example.org"}, allow}.
 {{s2s_host,"example.com"}, allow}.
-</PRE><P>Note, that for jabberd 1.4- or WPJabber-based
-services you have to make the transports log and do XDB by themselves:
+</PRE><P>Note, that for services based in jabberd14 or WPJabber
+you have to make the transports log and do XDB by themselves:
 </P><PRE CLASS="verbatim">  &lt;!--
      You have to add elogger and rlogger entries here when using ejabberd.
      In this case the transport will do the logging.
@@ -937,7 +937,7 @@ services you have to make the transports log and do XDB by themselves:
   &lt;xdb id="xdb"&gt;
     &lt;host/&gt;
     &lt;load&gt;
-      &lt;!-- this is a lib of wpjabber or jabberd --&gt;
+      &lt;!-- this is a lib of wpjabber or jabberd14 --&gt;
       &lt;xdb_file&gt;/usr/lib/jabber/xdb_file.so&lt;/xdb_file&gt;
       &lt;/load&gt;
     &lt;xdb_file xmlns="jabber:config:xdb_file"&gt;
@@ -3019,6 +3019,8 @@ all the environment variables and command line parameters.</P><P>The environment
        Path to the ejabberd service log file.
 </DD><DT CLASS="dt-description"><B><TT>EJABBERD_SO_PATH</TT></B></DT><DD CLASS="dd-description">
        Path to the directory with binary system libraries.
+</DD><DT CLASS="dt-description"><B><TT>EJABBERD_DOC_PATH</TT></B></DT><DD CLASS="dd-description">
+       Path to the directory with ejabberd documentation.
 </DD><DT CLASS="dt-description"><B><TT>HOME</TT></B></DT><DD CLASS="dd-description">
        Path to the directory that is considered <TT>ejabberd</TT>&#X2019;s home.
        This path is used to read the file <TT>.erlang.cookie</TT>.
@@ -3140,10 +3142,8 @@ be installed in the system.
 The file is searched by default in
 <TT>"/share/doc/ejabberd/guide.html"</TT>.
 The directory of the documentation can be specified in
-<TT>ejabberd.cfg</TT> with the option <TT>doc_path</TT>.
-For example:
-</P><PRE CLASS="verbatim">{doc_path, "/usr/local/share/doc/ejabberd/"}.
-</PRE><P> <A NAME="adhoccommands"></A> </P><!--TOC section Ad-hoc Commands-->
+the environment variable <TT>EJABBERD_DOC_PATH</TT>.
+See section <A HREF="#erlangconfiguration">4.1.2</A>.</P><P> <A NAME="adhoccommands"></A> </P><!--TOC section Ad-hoc Commands-->
 <H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc65">4.3</A>&#XA0;&#XA0;<A HREF="#adhoccommands">Ad-hoc Commands</A></H2><!--SEC END --><P> <A NAME="adhoccommands"></A> </P><P>If you enable <TT>mod_configure</TT> and <TT>mod_adhoc</TT>,
 you can perform several administrative tasks in <TT>ejabberd</TT>
 with a Jabber client.
index 9ee7be7778a8a8a9c2c92cc57e9a44c95fe3d333..04e87e3bfaa0a2df4265cdcc33ce850819b18aa8 100644 (file)
@@ -3894,6 +3894,8 @@ The environment variables:
        Path to the ejabberd service log file.
   \titem{EJABBERD\_SO\_PATH}
        Path to the directory with binary system libraries.
+  \titem{EJABBERD\_DOC\_PATH}
+       Path to the directory with ejabberd documentation.
   \titem{HOME}
        Path to the directory that is considered \ejabberd{}'s home.
        This path is used to read the file \term{.erlang.cookie}.
@@ -4030,11 +4032,9 @@ be installed in the system.
 The file is searched by default in
 \term{"/share/doc/ejabberd/guide.html"}.
 The directory of the documentation can be specified in
-\term{ejabberd.cfg} with the option \term{doc\_path}.
-For example:
-\begin{verbatim}
-{doc_path, "/usr/local/share/doc/ejabberd/"}.
-\end{verbatim}
+the environment variable \term{EJABBERD\_DOC\_PATH}.
+See section \ref{erlangconfiguration}.
+
 
 \makesection{adhoccommands}{Ad-hoc Commands}
 
index 8917df636683eb91fdbb8a41ac959aca57e0cff4..28c1268264645cba416179f2b11bc03a06406850 100644 (file)
@@ -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 ] \
index b71531c19daaeadd4a49a83b20f7d4599647e013..32a31d105038e73b67999d45078725b8d7524fbb 100644 (file)
@@ -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
index ea1a936ebf41586eed88d7eb8f4b3f21fa6dae57..832983914be23c44971eeb4dceb45f708c07e09c 100644 (file)
@@ -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};