2020-02-22 18:12:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright (c) Jupyter Development Team.
|
|
|
|
# Distributed under the terms of the Modified BSD License.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
wrapper=""
|
|
|
|
if [[ "${RESTARTABLE}" == "yes" ]]; then
|
2020-06-22 11:26:01 +00:00
|
|
|
wrapper="run-one-constantly"
|
2020-02-22 18:12:16 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
|
2020-06-22 11:26:01 +00:00
|
|
|
# launched by JupyterHub, use single-user entrypoint
|
|
|
|
exec /usr/local/bin/start-singleuser.sh "$@"
|
2020-02-22 18:12:16 +00:00
|
|
|
elif [[ ! -z "${JUPYTER_ENABLE_LAB}" ]]; then
|
2020-06-22 11:26:01 +00:00
|
|
|
. /usr/local/bin/start.sh $wrapper jupyter lab "$@"
|
2020-02-22 18:12:16 +00:00
|
|
|
else
|
2020-06-22 11:26:01 +00:00
|
|
|
. /usr/local/bin/start.sh $wrapper jupyter notebook "$@"
|
2020-02-22 18:12:16 +00:00
|
|
|
fi
|