mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
feat(ejabberdctl): Foreground option for docker
Docker needs services to run in foreground.
This commit is contained in:
parent
915383e150
commit
bee767158d
@ -228,6 +228,21 @@ iexlive()
|
|||||||
--erl \"$ERLANG_OPTS\" --erl $ARGS --erl \"$@\""
|
--erl \"$ERLANG_OPTS\" --erl $ARGS --erl \"$@\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# start server in the foreground
|
||||||
|
foreground()
|
||||||
|
{
|
||||||
|
check_start
|
||||||
|
$EXEC_CMD "$ERL \
|
||||||
|
$NAME $ERLANG_NODE \
|
||||||
|
-noinput \
|
||||||
|
-pa $EJABBERD_EBIN_PATH \
|
||||||
|
$MNESIA_OPTS \
|
||||||
|
$KERNEL_OPTS \
|
||||||
|
$EJABBERD_OPTS \
|
||||||
|
-s ejabberd \
|
||||||
|
$ERLANG_OPTS $ARGS \"$@\""
|
||||||
|
}
|
||||||
|
|
||||||
debugwarning()
|
debugwarning()
|
||||||
{
|
{
|
||||||
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
|
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
|
||||||
@ -300,11 +315,12 @@ help()
|
|||||||
{
|
{
|
||||||
echo ""
|
echo ""
|
||||||
echo "Commands to start an ejabberd node:"
|
echo "Commands to start an ejabberd node:"
|
||||||
echo " start Start an ejabberd node in server mode"
|
echo " start Start an ejabberd node in server mode"
|
||||||
echo " debug Attach an interactive Erlang shell to a running ejabberd node"
|
echo " debug Attach an interactive Erlang shell to a running ejabberd node"
|
||||||
echo " iexdebug Attach an interactive Elixir shell to a running ejabberd node"
|
echo " iexdebug Attach an interactive Elixir shell to a running ejabberd node"
|
||||||
echo " live Start an ejabberd node in live (interactive) mode"
|
echo " live Start an ejabberd node in live (interactive) mode"
|
||||||
echo " iexlive Start an ejabberd node in live (interactive) mode, within an Elixir shell"
|
echo " iexlive Start an ejabberd node in live (interactive) mode, within an Elixir shell"
|
||||||
|
echo " foreground Start an ejabberd node in server mode (attached)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Optional parameters when starting an ejabberd node:"
|
echo "Optional parameters when starting an ejabberd node:"
|
||||||
echo " --config-dir dir Config ejabberd: $ETC_DIR"
|
echo " --config-dir dir Config ejabberd: $ETC_DIR"
|
||||||
@ -468,6 +484,7 @@ case $ARGS in
|
|||||||
' iexdebug') iexdebug;;
|
' iexdebug') iexdebug;;
|
||||||
' live') live;;
|
' live') live;;
|
||||||
' iexlive') iexlive;;
|
' iexlive') iexlive;;
|
||||||
|
' foreground') foreground;;
|
||||||
' ping'*) ping ${ARGS# ping};;
|
' ping'*) ping ${ARGS# ping};;
|
||||||
' etop') etop;;
|
' etop') etop;;
|
||||||
' started') wait_for_status 0 30 2;; # wait 30x2s before timeout
|
' started') wait_for_status 0 30 2;; # wait 30x2s before timeout
|
||||||
|
Loading…
Reference in New Issue
Block a user