diff --git a/rel/app/env.sh.eex b/rel/app/env.sh.eex index 300fc16ab..f87af40f2 100644 --- a/rel/app/env.sh.eex +++ b/rel/app/env.sh.eex @@ -9,7 +9,8 @@ export LIVEBOOK_PORT=0 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) - [[ $RELEASE_COOKIE > $cookie_path ]] || export RELEASE_COOKIE + echo "$RELEASE_COOKIE" > "$cookie_path" + [ $? -eq 0 ] || export RELEASE_COOKIE fi cd $HOME diff --git a/rel/server/env.sh.eex b/rel/server/env.sh.eex index edc85bdf9..205f3211e 100644 --- a/rel/server/env.sh.eex +++ b/rel/server/env.sh.eex @@ -4,5 +4,6 @@ export RELEASE_MODE=interactive 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) - [[ $RELEASE_COOKIE > $cookie_path ]] || export RELEASE_COOKIE + echo "$RELEASE_COOKIE" > "$cookie_path" + [ $? -eq 0 ] || export RELEASE_COOKIE fi