ejabberdctl: Don't use .../releases/COOKIE, it's no longer included

And slightly clean the .erlang.cookie line
This partially reverts 9c23a7dc3f
This commit is contained in:
Badlop 2023-01-27 12:09:39 +01:00
parent 1d62dc4621
commit cc5c3f7b2c
1 changed files with 2 additions and 2 deletions

View File

@ -17,8 +17,8 @@ ERTS_VSN="{{erts_vsn}}"
ERL="{{erl}}"
IEX="{{bindir}}/iex"
EPMD="{{epmd}}"
[ -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
COOKIE_FILE="$HOME"/.erlang.cookie
[ -n "$ERLANG_COOKIE" ] && [ ! -f "$COOKIE_FILE" ] && echo "$ERLANG_COOKIE" > "$COOKIE_FILE" && chmod 400 "$COOKIE_FILE"
# check the proper system user is used
case $(id -un) in