25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

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

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