Container: When ERLANG_COOKIE is set, create cookie file; otherwise use -setcookie

This commit is contained in:
Badlop 2022-04-25 10:55:14 +02:00
parent b0db87c683
commit 9c23a7dc3f
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,8 @@ ERTS_VSN="{{erts_vsn}}"
ERL="{{erl}}"
IEX="{{bindir}}/iex"
EPMD="{{epmd}}"
INSTALLUSER="{{installuser}}"
[ -z "$ERLANG_COOKIE" ] && ERL_OPTIONS="-setcookie $(cat "${SCRIPT_DIR%/*}/releases/COOKIE")"
[ -n "$ERLANG_COOKIE" ] && [ ! -f "$HOME"/.erlang.cookie ] && echo "$ERLANG_COOKIE" > "$HOME"/.erlang.cookie && chmod 400 "$HOME"/.erlang.cookie
# check the proper system user is used
case $(id -un) in