Skip to content

Commit

Permalink
moved RStudio to 8787
Browse files Browse the repository at this point in the history
  • Loading branch information
dmalan committed Jan 27, 2024
1 parent b8130a3 commit a25e948
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions opt/cs50/bin/rstudio
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
#!/bin/bash

PORT="8080"
export USER="${USER:-$(whoami)}"

# Kill any process listing on the specified port
fuser --kill -TERM "${PORT}/tcp" &>/dev/null
fuser --kill -TERM "8787/tcp" &>/dev/null

# Formatting
bold=$(tput bold)
normal=$(tput sgr0)

# Start server
echo "${bold}Started server on http://0.0.0.0:${PORT}. Hit CTRL-C to stop the server.${normal}"
export USER="${USER:-$(whoami)}"
echo "${bold}Started server on http://0.0.0.0:8787. Hit CTRL-C to stop the server.${normal}"
/usr/lib/rstudio-server/bin/rserver \
--auth-none=1 \
--server-daemonize=0 \
--server-data-dir=/tmp/rstudio-server \
--server-user="$USER" \
--www-port="$PORT" \
--www-root-path=/ # Else $PORT is appended during redirects
--server-user="$USER"

0 comments on commit a25e948

Please sign in to comment.