24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-12 21:52:07 +02:00
Commit Graph

116 Commits

Author SHA1 Message Date
Badlop
cd421f98d7 ejabberdctl: Document how to stop a debug shell: control+g
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.
2023-09-26 18:51:47 +02:00
Badlop
19e2e169b1 Let "ejabberdctl etop" work in a release (if observer is available) 2023-08-28 18:27:30 +02:00
Badlop
6d596063de Elixir 1.15 removed support for --app
Removing that argument does not affect iexlive at all

For reference:
e1eecb8ca6
2023-08-28 18:26:55 +02:00
Badlop
a7c3c9b77d Pass ERLANG_OPTS when calling erl to parse the INET_DIST_INTERFACE (#4066)
This is required when running ejabberdctl in binary installers
and INET_DIST_INTERFACE was configured, because some boot files were removed
2023-08-28 18:26:48 +02:00
Jérôme Sautret
8288774787 Add EJABBERD_OPTS in ejabberdctl.cfg & revert "Improve ejabberdctl script"
EJABBERD_OPTS is used to pass options to erl only when starting
ejabberd, to enable -heart for example.

This partially reverts commit 6272c0e901.
2023-07-18 15:31:10 +02:00
Jérôme Sautret
6272c0e901 Improve ejabberdctl script
Improved handling of ERLANG_OPTS and fixed hanging process when running some ejabberdctl commands as root, such as debug or foreground.
2023-07-10 16:18:06 +02:00
duritong
122af79207
move spool dir to make it fully configurable per ejabberdctl.cfg (#3863)
In the packaged rpm the spool dir is set to:
```
: "${SPOOL_DIR:="/opt/ejabberd/database/$ERLANG_NODE"}"
```

However, `$ERLANG_NODE` is effectively set later (now in line 67), which effectively makes spool dir always in `...../ejabberd@localhost`
2022-10-26 14:02:42 +02:00
Badlop
30f1e28468 Support ERL_DIST_PORT option to work without epmd
Please note:
- Erlang/OTP 23.1 or higher is required to use ERL_DIST_PORT
- "make relive" doesn't support ERL_DIST_PORT, neither rebar3 nor elixir
- "make install" doesn't work with Elixir since at least ejabberd 21.07

Reference:
https://www.erlang.org/blog/otp-23-highlights/
https://blog.erlware.org/epmdlessless/
2022-09-13 17:55:15 +02:00
Mark Zealey
555ff2db4c
Add log_burst_limit_* options (#3865)
* Add log_burst_limit_* options

On our ejabberd deployment we were sometimes seeing more than 500
msgs/sec of legitimate traffic, however this was getting silently
dropped. Provide config options to enable this limit to be configured
from the config file.

* Pass new logging vars in via ejabberdctl
2022-08-01 12:07:54 +02:00
Badlop
45c7fbb5ae Switch "make rel" and "make dev" to paths: conf, database, logs 2022-05-02 13:17:53 +02:00
Holger Weiss
a6f0feb23b ejabberdctl: Remove unused environment variable
The EJABBERD_DOC_PATH variable is no longer used (cf. commit
949e71efb6).
2022-02-19 23:58:36 +01:00
Badlop
6279cac932 Reorganize and complete documentation of node start/debug commands 2022-02-03 18:21:55 +01:00
Holger Weiss
5ff45e0f00 ejabberdctl: Let shellcheck ignore unused ERTS_VSN
The ERTS_VSN variable is only used for releases built with Rebar 3.
2021-12-23 14:46:53 +01:00
Holger Weiss
94a733c666 Fix ERTS path in ejabberdctl with rebar3 release
Rebar 2 expands {{erts-vsn}} to "erts-$vsn", Rebar 3 expands it to just
"$vsn".  Make sure `make rel` doesn't end up with a "$vsn" directory
next to "erts-$vsn" (which happened when using Rebar 3), and make sure
that ejabberdctl expects both "erl" and "epmd" to be installed below
"erts-$vsn" (which it didn't when using Rebar 3).
2021-12-23 14:24:27 +01:00
Badlop
e2b7717dd9 Workaround to support ShellCheck older than 0.8.0 2021-12-23 13:57:16 +01:00
Badlop
fdc664a318 The read value is useless, so use throwaway variable name 2021-12-23 13:57:04 +01:00
Badlop
4deff0513c Harmless warning, but let's prevent it anyway 2021-12-23 13:57:02 +01:00
Badlop
46324385f2 SCRIPT_DIR is used by relx releases 2021-12-23 13:57:00 +01:00
Badlop
b5d8b22486 In POSIX sh, RANDOM is undefined, use alternative 2021-12-23 13:56:58 +01:00
Badlop
1b22368f6b In POSIX sh, OSTYPE is undefined. ejabberd doesn't work natively in win anyway 2021-12-23 13:56:56 +01:00
Badlop
21b021d912 Set SCRIPT_DIR as done by the ejabberd script generated by "rebar3 release" 2021-06-25 12:53:30 +02:00
Badlop
b3374e1f99 Remove SMP option from ejabberdctl.cfg, -smp was removed in OTP 21 (#3560) 2021-04-15 20:28:43 +02:00
Paweł Chmielowski
3516d2053c Add 'ejabberdctl foreground-quiet'
This starts ejabberd without detaching process but setups
console logging to display only critical messages.
2021-01-27 09:24:05 +01:00
Paweł Chmielowski
95c157409b Fix handling of log_rotate_size: infinity
This should fix issue reported in #3462
2021-01-13 11:48:46 +01:00
Badlop
d9cb6d1af7 log_rotate_date and log_rate_limit are deprecated since e4a8afb (#3382) 2020-09-22 13:58:56 +02:00
Holger Weiss
65260e2449 ejabberdctl: Avoid bashisms
Don't let the ejabberdctl script depend on non-POSIX syntax.  (Also, fix
a typo and avoid tabs.)
2020-08-24 06:42:45 +02:00
Jerome Sautret
839229b5f0 Check if TERM is set before running a remote debug shell 2020-07-30 10:33:38 +02:00
Mickael Remond
09454e1658
Allow passing Erlang VM args through vm.args config file
This can be used to define the Erlang cookie in a place that feels less foreign to
non Erlang users.

Fixes #3343
2020-07-29 17:35:59 +02:00
Paweł Chmielowski
eac7e3488c Remove bash-izm from ejabberdctl.template introduced recently 2020-04-03 17:28:27 +02:00
Jerome Sautret
762486d199 Limit number of atoms used by ejabberdctl ( #2977) 2020-04-02 15:51:16 +02:00
Evgeny Khramtsov
e3962aea6e Use lager on OTP<22.0
This also lowers Erlang/OTP minimum version requirement back to 19.3
2019-10-25 11:44:04 +03:00
Evgeny Khramtsov
a23b6fb7ec Don't parse obsoleted options 2019-10-19 12:14:02 +03:00
tv
c43037887a ejabberdctl: fix parameter parsing 2018-04-25 00:41:30 +02:00
Holger Weiss
1b26c8d214 ejabberdctl: Omit redundant erl option
The "-detached" flag implies "-noinput".
2018-01-29 01:16:20 +01:00
Licaon_Kter
a0c8cac1b6
Fix typo /this/it/ 2018-01-21 13:44:30 +00:00
Randy Barlow
12d9d97baa Use /bin/sh as the explicit shell when using su in ejabberdctl.
Some distributions (such as Fedora) use /sbin/nologin as the login
shell for the ejabberd user. The newer version of ejabberdctl uses
su to perform the command if the INSTALLUSER invokes the script.
This commit adjusts the call to su so that it passes /bin/sh as
the shell to use so that it will work correctly when the ejabberd
user's shell is set to nologin.

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
2017-12-10 12:52:22 -05:00
Holger Weiss
74749f5dbb ejabberdctl: Fix 'read' syntax for non-bash shells 2017-11-07 21:23:48 +01:00
Holger Weiss
5d5b4cdfb5 ejabberdctl: Fix paths for release build
The ejabberdctl version generated by "make rel" relies on the SCRIPT_DIR
variable which got lost in commit cbe6553baa.
2017-11-06 21:35:44 +01:00
Christophe Romain
609a1d07cf harden ejabberdctl (#1977) 2017-09-27 15:04:57 +02:00
Christophe Romain
cb076924cc Merge pull request #1996 from nosnilmot/ejabberdctl-quote-peer
Quote $PEER in ping command to avoid hostnames containing "-" being interpreted as arithmetic
2017-09-18 13:09:16 +02:00
Christophe Romain
cce4056040 Fix iexdebug and iexlive commands (#1981) 2017-09-18 13:01:10 +02:00
Stu Tomlinson
2a7d9d93c8 Quote $PEER in ping command to avoid hostnames containing "-" being interpreted as arithmetic 2017-09-11 15:00:00 +01:00
Mathias Ertl
c658907331 fix typo 2017-08-08 19:09:55 +02:00
Mathias Ertl
aa9eb001d0 fix FIREWALL_WINDOW option 2017-08-04 18:49:33 +02:00
Christophe Romain
72dbb6e7c1 Fix errors when running ejabberdctl as root 2017-07-20 14:40:50 +02:00
Ashish SHUKLA
95613a11ab Fix ERLANG_OPTS when setting INET_DIST_INTERFACE 2017-07-15 16:42:47 +05:30
Badlop
d4cdc3a246 Fix ERLANG_OPTS end lines when setting FIREWALL_WINDOW (#1856) 2017-07-12 14:43:28 +02:00
Christophe Romain
0f12804a49 Quote paths to allow spaces (#1789) 2017-06-28 11:39:05 +02:00
Christophe Romain
6c8b037422 Fix refactor bug on wait_status 2017-06-13 12:37:27 +02:00
Ivy Rogatko
0973a8d6c1 fixing iex bug with proper --name arguement 2017-06-07 21:15:17 -07:00