Container: When ERLANG_COOKIE is set, create cookie file; otherwise use -setcookie
This commit is contained in:
parent
b0db87c683
commit
9c23a7dc3f
|
@ -17,7 +17,8 @@ ERTS_VSN="{{erts_vsn}}"
|
||||||
ERL="{{erl}}"
|
ERL="{{erl}}"
|
||||||
IEX="{{bindir}}/iex"
|
IEX="{{bindir}}/iex"
|
||||||
EPMD="{{epmd}}"
|
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
|
# check the proper system user is used
|
||||||
case $(id -un) in
|
case $(id -un) in
|
||||||
|
|
Loading…
Reference in New Issue