From 34575a023b19cdafcae0db945a8c8d8e44e3455f Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 18 Feb 2019 14:56:14 -0500 Subject: Refactor build/publish --- scripts/start.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'scripts/start.sh') diff --git a/scripts/start.sh b/scripts/start.sh index 6298bbd..c773303 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,6 +1,13 @@ #!/bin/bash -if [[ ${#} == 0 ]]; then - exec "bash" -else +set -vxe +if [[ "${@}" == bash* ]]; then exec "${@}" fi + +if [[ -n ${JUPYTER_API_TOKEN} ]]; then + exec jupyterhub-singleuser --ip=0.0.0.0 "${@}" +elif [[ -n ${JUPYTER_ENABLE_LAB} ]]; then + exec jupyter labhub --ip=0.0.0.0 "${@}" +else + exec jupyter notebook --ip=0.0.0.0 "${@}" +fi -- cgit