From 7f8519c0afd0135f0d2b563fc8b0b8022ee396c4 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 2 Oct 2024 18:32:32 +0200 Subject: [PATCH] ejabberdctl: If ERLANG_NODE lacks host, add hostname (#4288) --- ejabberdctl.template | 1 + 1 file changed, 1 insertion(+) diff --git a/ejabberdctl.template b/ejabberdctl.template index 83ec7e1bd..21be6430f 100755 --- a/ejabberdctl.template +++ b/ejabberdctl.template @@ -66,6 +66,7 @@ done # shellcheck source=ejabberdctl.cfg.example [ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH" [ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG" +[ "$ERLANG_NODE" = "${ERLANG_NODE%@*}" ] && ERLANG_NODE="$ERLANG_NODE@$(hostname -s)" [ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s" : "${SPOOL_DIR:="{{spool_dir}}"}" : "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"