On Sat, 14 Dec 2024 14:42:27 +0100,
Volker Schlecht <openbsd-po...@schlecht.dev> wrote:
> 
> OK for the rc change, but I would propose the following edits to the README:
>

Like this?

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     14 Dec 2024 14:41:46 -0000
@@ -2,9 +2,13 @@
 | 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 on all IPv4 addresses (0.0.0.0). To listen on
+IPv6 addresses you need to duplicate the listener in
+${SYSCONFDIR}/ejabberd/ejabberd.yml
+
+By default ejabberd and ejabberdctl are configured not to use epmd.
+To use epmd, comment out the ERL_DIST_PORT setting 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 +18,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

Reply via email to