Skip to content

Commit

Permalink
Fix very first "eturnalctl daemon" startup
Browse files Browse the repository at this point in the history
On Erlang/OTP 23 and newer, the very first "eturnalctl daemon" startup
hangs due to a missing Erlang cookie file.  Work around this issue until
it's fixed:

erlware/relx#905
  • Loading branch information
weiss committed Jul 20, 2022
1 parent 259f54b commit 5045a27
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ project adheres to [Semantic Versioning][SemVer].
### Fixed
- Avoid permission issues in the case where `eturnalctl` was invoked by root
from a directory the user running eturnal isn't permitted to change into.
- Make sure `eturnalctl daemon` won't hang on the very first startup when using
Erlang/OTP 23 or newer.

## [1.9.1] - 2022-07-17
### Added
Expand Down
11 changes: 11 additions & 0 deletions scripts/hooks/pre_start
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,14 @@ if ! [ -e "$ETURNAL_ETC_PREFIX/etc/eturnal.yml" ]
then
export ETURNAL_ETC_PREFIX="$RELEASE_ROOT_DIR"
fi

# Until https://github.com/erlware/relx/issues/905 is fixed:
if [ -z "$COOKIE" ]
then
"$ERTS_DIR/bin/erl" \
-noinput \
-boot 'no_dot_erlang' \
-sname 'cookie' \
-eval 'halt()' \
2>'/dev/null' || :
fi

0 comments on commit 5045a27

Please sign in to comment.