From bf40a9ef6210366c7f21120bd2b98857a39bf480 Mon Sep 17 00:00:00 2001 From: Dominic Letz Date: Tue, 11 Jun 2024 01:12:45 +0200 Subject: [PATCH] fix rpc release node name --- rel/linux/run.eex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rel/linux/run.eex b/rel/linux/run.eex index 5be5da4..405d0f9 100755 --- a/rel/linux/run.eex +++ b/rel/linux/run.eex @@ -84,6 +84,8 @@ release_distribution () { rpc () { export ELIXIR_ERL_OPTIONS=${ELIXIR_ERL_OPTIONS//-heart/} + export EPMD=`find . -name epmd -type f | tail -n1` + export RELEASE_NODE=`$EPMD -names | grep "name <%= @package.app_name %>" | grep -oE "<%= @package.app_name %>_[0-9]+"`@127.0.0.1 exec "$REL_VSN_DIR/elixir" \ --hidden --cookie "$RELEASE_COOKIE" \ $(release_distribution "rpc-$(rand)-$RELEASE_NODE") \ @@ -157,6 +159,9 @@ case $RELEASE_COMMAND in ;; remote) + export ELIXIR_ERL_OPTIONS=${ELIXIR_ERL_OPTIONS//-heart/} + export EPMD=`find . -name epmd -type f | tail -n1` + export RELEASE_NODE=`$EPMD -names | grep "name <%= @package.app_name %>" | grep -oE "<%= @package.app_name %>_[0-9]+"`@127.0.0.1 exec "$REL_VSN_DIR/iex" \ --werl --hidden --cookie "$RELEASE_COOKIE" \ $(release_distribution "rem-$(rand)-$RELEASE_NODE") \