diff --git a/start_rstudio_server.sh b/start_rstudio_server.sh index aff59c3..b2e5adb 100755 --- a/start_rstudio_server.sh +++ b/start_rstudio_server.sh @@ -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 @@ -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 + +