You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
756 B
Bash
28 lines
756 B
Bash
#!/bin/bash
|
|
## Start R Shiny app "sample-matrix"
|
|
## Written Dec 22, 2013
|
|
## Taha Ahmed
|
|
|
|
|
|
## bash /home/taha/chepec/chetex/common/bash/shiny-matrix.sh
|
|
|
|
|
|
# Random port number between 2000 and 10000
|
|
PORT=$(shuf -i 2000-10000 -n 1)
|
|
|
|
# Write the current Shiny matrix port number to file in
|
|
# ~/chepec/chetex/sample-matrix/shinyapp/shiny.port
|
|
echo $PORT > /home/taha/chepec/chetex/sample-matrix/shinyapp/shiny.port
|
|
|
|
|
|
# Save PID of this bash job
|
|
#echo $$ > /home/taha/chepec/chetex/sample-matrix/shinyapp/shiny.pid
|
|
# do iy inside Shiny itself with "reactive values" instead
|
|
|
|
# Run R Shiny app at localhost port
|
|
# Note: this process does not return control to bash...
|
|
nohup R -e "shiny::runApp('/home/taha/chepec/chetex/sample-matrix/shinyapp', port = $PORT)"
|
|
|
|
|
|
|