diff options
author | Jerome Sautret <jerome.sautret@process-one.net> | 2020-07-30 10:33:38 +0200 |
---|---|---|
committer | Jerome Sautret <jerome.sautret@process-one.net> | 2020-07-30 10:33:38 +0200 |
commit | 839229b5f00186db53f714606ba23ec729b2be9b (patch) | |
tree | ac5d96359d84bae41acedf4bc3645b7b4f8dd24f | |
parent | Merge pull request #3346 from processone/ejabberd-3343 (diff) |
Check if TERM is set before running a remote debug shell
-rwxr-xr-x | ejabberdctl.template | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ejabberdctl.template b/ejabberdctl.template index 43ceb302c..a30dabcaa 100755 --- a/ejabberdctl.template +++ b/ejabberdctl.template @@ -130,6 +130,14 @@ exec_iex() # usage debugwarning() { + if [ "$OSTYPE" != "cygwin" ] && [ "$OSTYPE" != "win32" ]; then + if [ "a$TERM" == "a" ] || [ "$TERM" == "dumb" ] ; then + echo "Terminal type not supported." + echo "You may have to set the TERM environnement variable to fix this." + exit 8 + fi + fi + if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then echo "--------------------------------------------------------------------" echo "" |