From cd421f98d7b927ba400bcab71b59b665f1c82854 Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 26 Sep 2023 13:55:34 +0200 Subject: [PATCH] ejabberdctl: Document how to stop a debug shell: control+g MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit control+g is the correct way to enter shell break mode, as documented in https://www.erlang.org/doc/apps/erts/tty The ejabberdctl script included in installers use the included VT100, and that may break when hitting control+c. In that scenario let's explicitly recommend to not use control+c. Thanks to Holger Weiß for the report. --- .github/container/ejabberdctl.template | 6 ++++-- ejabberdctl.template | 6 ++++-- tools/make-binaries | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/container/ejabberdctl.template b/.github/container/ejabberdctl.template index dc9e99bc6..1a8df3e12 100755 --- a/.github/container/ejabberdctl.template +++ b/.github/container/ejabberdctl.template @@ -162,9 +162,11 @@ debugwarning() echo "Please be extremely cautious with your actions," echo "and exit immediately if you are not completely sure." echo "" - echo "To detach this shell from ejabberd, press:" - echo " control+c, control+c" + echo "To exit and detach this shell from ejabberd, press:" + echo " control+g and then q" echo "" + #vt100 echo "Please do NOT use control+c in this debug shell !" + #vt100 echo "" echo "--------------------------------------------------------------------" echo "To bypass permanently this warning, add to ejabberdctl.cfg the line:" echo " EJABBERD_BYPASS_WARNINGS=true" diff --git a/ejabberdctl.template b/ejabberdctl.template index d128cd6e9..1a7403e71 100755 --- a/ejabberdctl.template +++ b/ejabberdctl.template @@ -149,9 +149,11 @@ debugwarning() echo "Please be extremely cautious with your actions," echo "and exit immediately if you are not completely sure." echo "" - echo "To detach this shell from ejabberd, press:" - echo " control+c, control+c" + echo "To exit and detach this shell from ejabberd, press:" + echo " control+g and then q" echo "" + #vt100 echo "Please do NOT use control+c in this debug shell !" + #vt100 echo "" echo "--------------------------------------------------------------------" echo "To bypass permanently this warning, add to ejabberdctl.cfg the line:" echo " EJABBERD_BYPASS_WARNINGS=true" diff --git a/tools/make-binaries b/tools/make-binaries index d0398d6d3..9840cb5f6 100755 --- a/tools/make-binaries +++ b/tools/make-binaries @@ -411,6 +411,7 @@ edit_ejabberdctl() -e '/ERL_OPTIONS=/d' \ -e 's|_DIR:=".*}/|_DIR:="/opt/ejabberd/|' \ -e 's|/database|/database/$ERLANG_NODE|' \ + -e 's|#vt100 ||' \ "$code_dir/bin/${rel_name}ctl" } #.