livebook/rel/app/env.sh.eex
José Valim 5acbd2efad
Add LIVEBOOK_SHUTDOWN_ENABLED (#1111)
* Add LIVEBOOK_SHUTDOWN_ENABLED

Previously we relied on code:get_mode(), but since
releases are starting in interactive mode to use
less memory, we need a clearer mechanism.

* Move shutdown feature check to Livebook.Config

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2022-04-14 15:52:28 +02:00

7 lines
244 B
Elixir

export RELEASE_MODE=interactive
export LIVEBOOK_SHUTDOWN_ENABLED=true
cookie_path="${RELEASE_ROOT}/releases/COOKIE"
if [ ! -f $cookie_path ]; then
cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 > $cookie_path
fi