ports@, Update to erlang-27 allows to discover some minor issues in net/ejabberd which I'm addressed here:
1. rc script waits until ejabberd is started or stopped; 2. ejabberdctl stop kills epmd, and it kills systems' epmd which was started via rcctl start epmd27. I switch off using epmd by default to avoid that; 3. improved a bit section of README how to run it in cluster. Feedback? Ok? Index: net/ejabberd/Makefile =================================================================== RCS file: /home/cvs/ports/net/ejabberd/Makefile,v diff -u -p -r1.55 Makefile --- net/ejabberd/Makefile 13 Dec 2024 15:20:44 -0000 1.55 +++ net/ejabberd/Makefile 13 Dec 2024 17:13:06 -0000 @@ -1,7 +1,7 @@ COMMENT = robust, ubiquitous and massively scalable messaging platform V = 24.10 -REVISION = 3 +REVISION = 4 DIST_TUPLE += github processone ejabberd ${V} . CATEGORIES = net Index: net/ejabberd/patches/patch-ejabberdctl_cfg_example =================================================================== RCS file: net/ejabberd/patches/patch-ejabberdctl_cfg_example diff -N net/ejabberd/patches/patch-ejabberdctl_cfg_example --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ net/ejabberd/patches/patch-ejabberdctl_cfg_example 13 Dec 2024 13:52:59 -0000 @@ -0,0 +1,14 @@ +Do not use epmd out of the box to prevent killing system's epmd + +Index: ejabberdctl.cfg.example +--- ejabberdctl.cfg.example.orig ++++ ejabberdctl.cfg.example +@@ -62,7 +62,7 @@ + # + # Default: not defined + # +-#ERL_DIST_PORT=5210 ++ERL_DIST_PORT=5210 + + #. + #' ERL_EPMD_ADDRESS: IP addresses where EPMD listens for connections Index: net/ejabberd/pkg/README =================================================================== RCS file: /home/cvs/ports/net/ejabberd/pkg/README,v diff -u -p -r1.11 README --- net/ejabberd/pkg/README 25 Nov 2024 08:36:16 -0000 1.11 +++ net/ejabberd/pkg/README 13 Dec 2024 17:34:44 -0000 @@ -2,9 +2,14 @@ | Running ${PKGSTEM} on OpenBSD +------------------------------------------------------------------------------- -ejabberd is listening to all IPv4 addresses (0.0.0.0), in case if you -want to listen to IPv6 addresses you need to duplicate listener in -ejabberd.yml +ejabberd is listening to all IPv4 addresses (0.0.0.0), in the case if +you want to listen to IPv6 addresses you need to duplicate listener in +${SYSCONFDIR}/ejabberd/ejabberd.yml + +Also, ejabberd and ejabberdctl don't use epmd, because ejaberdctl kills +epmd on server stop which kills systems' epmd as well, in the case if +you want to use epmd, you need to comment ERL_DIST_PORT in +${SYSCONFDIR}/ejabberd/ejabberdctl.cfg To run a cluster you should distribute the same cookie ${LOCALSTATEDIR}/db/ejabberd/.erlang.cookie to all machines. These files @@ -14,3 +19,9 @@ this rcctl set ejabberd flags --node ejabberd@somehost +or via ERLANG_NODE in ${SYSCONFDIR}/ejabberd/ejabberdctl.cfg + + ERLANG_NODE=ejabberd@somehost + +Note that to change a node name, you should migrate Mnesia, see: +https://docs.ejabberd.im/admin/guide/managing/?h=mnesia_change_nodename#change-computer-hostname Index: net/ejabberd/pkg/ejabberd.rc =================================================================== RCS file: /home/cvs/ports/net/ejabberd/pkg/ejabberd.rc,v diff -u -p -r1.5 ejabberd.rc --- net/ejabberd/pkg/ejabberd.rc 25 Nov 2024 08:36:16 -0000 1.5 +++ net/ejabberd/pkg/ejabberd.rc 12 Dec 2024 22:29:48 -0000 @@ -6,11 +6,12 @@ daemon_user=_ejabberd . /etc/rc.d/rc.subr rc_start() { - rc_exec "${daemon} ${daemon_flags} start" + rc_exec "${daemon} ${daemon_flags} start \ + && ${daemon} ${daemon_flags} started" } rc_check() { - rc_exec "${daemon} ${daemon_flags} ping | grep pong" + rc_exec "${daemon} ${daemon_flags} ping | grep -q pong" } rc_reload() { @@ -18,7 +19,8 @@ rc_reload() { } rc_stop() { - rc_exec "${daemon} ${daemon_flags} stop" + rc_exec "${daemon} ${daemon_flags} stop \ + && ${daemon} ${daemon_flags} stopped" } rc_cmd $1 -- wbr, Kirill