mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-11-10 09:03:02 +08:00
Make sure setting cookie really works on a read-only fs
This commit is contained in:
parent
c751e444e7
commit
511df69495
1 changed files with 1 additions and 2 deletions
|
@ -9,8 +9,7 @@ export PATH="$RELEASE_ROOT/vendor/otp/erts-<%= @release.erts_version%>/bin:$RELE
|
|||
cookie_path="${RELEASE_ROOT}/releases/COOKIE"
|
||||
if [ ! -f $cookie_path ]; 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"
|
||||
[ $? -eq 0 ] || export RELEASE_COOKIE
|
||||
echo "$RELEASE_COOKIE" > "$cookie_path" || export RELEASE_COOKIE
|
||||
fi
|
||||
|
||||
cd $HOME
|
||||
|
|
Loading…
Reference in a new issue