Skip to content

Commit

Permalink
Add revocation list path to work with rstudio server 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Sep 24, 2020
1 parent 8cb85f9 commit 421ce40
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion start_rstudio_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ COOKIE_KEY_PATH=/tmp/rstudio-server/${USER}_secure-cookie-key
rm -f $COOKIE_KEY_PATH
mkdir -p $(dirname $COOKIE_KEY_PATH)

# Rserver >= version 1.3 requires the --auth-revocation-list-dir parameter
if [ $(sed -n '/^1.3./p;q' /usr/lib/rstudio-server/VERSION) ] ;
then
REVOCATION_LIST_DIR=/tmp/rstudio-server/${USER}_revocation-list-dir
mkdir -p $REVOCATION_LIST_DIR
REVOCATION_LIST_PAR="--auth-revocation-list-dir=$REVOCATION_LIST_DIR"
else
REVOCATION_LIST_PAR=""
fi

python -c 'import uuid; print(uuid.uuid4())' > $COOKIE_KEY_PATH
# uuid > $COOKIE_KEY_PATH
chmod 600 $COOKIE_KEY_PATH
Expand All @@ -30,4 +40,7 @@ export RETICULATE_PYTHON=$CONDA_PREFIX/bin/python
--secure-cookie-key-file=$COOKIE_KEY_PATH \
--rsession-which-r=$(which R) \
--rsession-ld-library-path=$CONDA_PREFIX/lib \
--rsession-path="$CWD/rsession.sh"
--rsession-path="$CWD/rsession.sh" \
$REVOCATION_LIST_PAR


0 comments on commit 421ce40

Please sign in to comment.