if [ -f "${RELEASE_ROOT}/user/env.sh" ]; then . "${RELEASE_ROOT}/user/env.sh" fi export RELEASE_MODE=interactive export RELEASE_NODE=${LIVEBOOK_NODE:-${RELEASE_NODE:-livebook_server}} if [ -z "${LIVEBOOK_CLUSTER}" ]; then DISTRIBUTION_DEFAULT="sname"; else DISTRIBUTION_DEFAULT="name"; fi export RELEASE_DISTRIBUTION=${LIVEBOOK_DISTRIBUTION:-${RELEASE_DISTRIBUTION:-${DISTRIBUTION_DEFAULT}}} if [ ! -z "${LIVEBOOK_COOKIE}" ]; then export RELEASE_COOKIE=${LIVEBOOK_COOKIE}; fi cookie_path="${RELEASE_ROOT}/releases/COOKIE" if [ ! -f $cookie_path ] && [ -z "$RELEASE_COOKIE" ]; then RELEASE_COOKIE=$(cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) echo "$RELEASE_COOKIE" > "$cookie_path" || export RELEASE_COOKIE fi