The integration between chertex.sh and shiny-matrix.sh now works better.

Running chertex.sh on sample-matrix.Rnw kills previous shiny::runApp() instances,
and creates a new and persistent shiny instance using the nohup command.
master
Taha Ahmed 11 years ago
parent a6daa3aced
commit c7f5f7e6f8

@ -129,8 +129,9 @@ if [ $# -eq 1 ]; then
# Old attempts, never worked # Old attempts, never worked
#PORT=$(</home/taha/chepec/chetex/sample-matrix/shinyapp/shiny.port) #PORT=$(</home/taha/chepec/chetex/sample-matrix/shinyapp/shiny.port)
#bash -c "R -e 'shiny::runApp(\"/home/taha/chepec/chetex/sample-matrix/shinyapp\", port = $PORT)'" #bash -c "R -e 'shiny::runApp(\"/home/taha/chepec/chetex/sample-matrix/shinyapp\", port = $PORT)'"
# Before starting new shiny process, kill any previous instances
bash -c "shiny-matrix.sh" & pkill -f "shiny::runApp"
bash -c "/home/taha/chepec/chetex/common/bash/shiny-matrix.sh" &
Rscript -e "library(knitr); knit(input='$jobname.Rmd', output='$jobname.md')" Rscript -e "library(knitr); knit(input='$jobname.Rmd', output='$jobname.md')"
Rscript -e "library(markdown); markdownToHTML('$jobname.md', '$jobname.html', stylesheet = 'custom.css')" Rscript -e "library(markdown); markdownToHTML('$jobname.md', '$jobname.html', stylesheet = 'custom.css')"
fi fi

@ -21,7 +21,7 @@ echo $PORT > /home/taha/chepec/chetex/sample-matrix/shinyapp/shiny.port
# Run R Shiny app at localhost port # Run R Shiny app at localhost port
# Note: this process does not return control to bash... # Note: this process does not return control to bash...
R -e "shiny::runApp('~/chepec/chetex/sample-matrix/shinyapp', port = $PORT)" nohup R -e "shiny::runApp('~/chepec/chetex/sample-matrix/shinyapp', port = $PORT)"

Loading…
Cancel
Save