diff --git a/chertex.sh b/chertex.sh index 34d6a13..272a2bc 100755 --- a/chertex.sh +++ b/chertex.sh @@ -123,8 +123,14 @@ if [ $# -eq 1 ]; then # If $jobname is sample-matrix, run knitr and markdown if [[ $jobname == "sample-matrix" ]]; then echo " -----------------------------------------------------------" - echo " sample-matrix detected: running knit() and markdownToHTML()" + echo " sample-matrix: update SHINY, run knit() + markdownToHTML()" echo " -----------------------------------------------------------" + + # Old attempts, never worked + #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... +R -e "shiny::runApp('~/chepec/chetex/sample-matrix/shinyapp', port = $PORT)" + + +