OTP releases: only set name and distribution type if not set already
authorrinpatch <rinpatch@sdf.org>
Fri, 22 Nov 2019 16:58:39 +0000 (19:58 +0300)
committerrinpatch <rinpatch@sdf.org>
Fri, 22 Nov 2019 16:58:39 +0000 (19:58 +0300)
Fixes not being able to run two OTP releases on one machine because of
the name conflict.

rel/env.sh.eex

index a4ce2529531778b8be50d53334a31a90816e728e..e1b87102d15207295dd9ed6a7199725b4d5b43e0 100644 (file)
@@ -8,5 +8,5 @@
 # fi
 
 # Set the release to work across nodes
-export RELEASE_DISTRIBUTION=name
-export RELEASE_NODE=<%= @release.name %>@127.0.0.1
+export RELEASE_DISTRIBUTION="${RELEASE_DISTRIBUTION:-name}"
+export RELEASE_NODE="${RELEASE_NODE:-<%= @release.name %>@127.0.0.1}"