From dfc97beaef721163dc7a17fd7dc3b17d00d4fb79 Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 15 May 2009 22:10:53 +0000 Subject: [PATCH] Allow to define additional Erlang options in ejabberdctl.cfg (thanks to Sergei Golovan) SVN Revision: 2079 --- src/ejabberdctl.cfg.example | 20 +++++++++++++++++++- src/ejabberdctl.template | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/ejabberdctl.cfg.example b/src/ejabberdctl.cfg.example index d6bb80e16..0c8d0c5a6 100644 --- a/src/ejabberdctl.cfg.example +++ b/src/ejabberdctl.cfg.example @@ -78,7 +78,23 @@ #ERL_MAX_ETS_TABLES=1400 #. -#' ERLANG_NODE +#' ERL_OPTIONS: Additional Erlang options +# +# The next variable allows to specify additional options passed to erlang while +# starting ejabberd. Some useful options are -noshell, -detached, -heart. When +# ejabberd is started from an init.d script options -noshell and -detached are +# added implicitly. See erl(1) for more info. +# +# It might be useful to add "-pa /usr/local/lib/ejabberd/ebin" if you +# want to add local modules in this path. +# +# Default: "" +# +#ERL_OPTIONS="" + +#. +#' ERLANG_NODE: Erlang node name +# # The next variable allows to explicitly specify erlang node for ejabberd # It can be given in different formats: # ERLANG_NODE=ejabberd @@ -94,4 +110,6 @@ # #ERLANG_NODE=ejabberd +#. +#' # vim: foldmarker=#',#. foldmethod=marker: diff --git a/src/ejabberdctl.template b/src/ejabberdctl.template index dcb8f2ac9..5ed63b70e 100644 --- a/src/ejabberdctl.template +++ b/src/ejabberdctl.template @@ -79,7 +79,7 @@ else KERNEL_OPTS="-kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} inet_dist_listen_max ${FIREWALL_WINDOW#*-}" fi -ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $KERNEL_OPTS" +ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $ERL_OPTIONS $KERNEL_OPTS" # define additional environment variables if [ "$EJABBERDDIR" = "" ]; then