Clarify background/foreground behavior in app.sh start output

Users now see explicit messages about whether Jupyter runs in
background or foreground, what happens when the terminal closes,
and how to stop the server.
This commit is contained in:
saymrwulf 2026-04-16 09:28:10 +02:00
parent 1ec0a5e2ad
commit d4ca5f99dc

View file

@ -241,7 +241,11 @@ cmd_start() {
local url
url=$(_server_url || echo "http://localhost:8888/lab/tree/00_START_HERE.ipynb")
warn "JupyterLab already running (PID $existing_pid)"
echo ""
echo " $url"
echo ""
echo " To stop: bash scripts/app.sh stop"
echo " To restart: bash scripts/app.sh restart"
if $open_browser; then
if command -v open &>/dev/null; then
open "$url"
@ -267,11 +271,14 @@ cmd_start() {
# Foreground mode — Ctrl-C stops the server cleanly
if $foreground; then
info "Starting JupyterLab on port $port (foreground, Ctrl-C to stop)..."
info "Starting JupyterLab on port $port (foreground mode)..."
local url="http://localhost:$port/lab/tree/00_START_HERE.ipynb"
echo ""
echo " ${BOLD}$url${NC}"
echo ""
echo " Jupyter is running in the foreground — this terminal is occupied."
echo " Press Ctrl-C to stop. Closing this terminal also stops Jupyter."
echo ""
if $open_browser; then
# Open browser after a short delay (in background)
(sleep 3 && {
@ -326,10 +333,17 @@ cmd_start() {
done
local url="http://localhost:$port/lab/tree/00_START_HERE.ipynb"
ok "JupyterLab running (PID $pid)"
ok "JupyterLab running (PID $pid) on port $port"
echo ""
echo " ${BOLD}$url${NC}"
echo ""
echo " Jupyter is running in the background — this terminal is free."
echo " It will keep running even if you close this terminal."
echo ""
echo " To stop: bash scripts/app.sh stop"
echo " To check: bash scripts/app.sh status"
echo " Logs: bash scripts/app.sh logs -f"
echo ""
if $open_browser; then
if command -v open &>/dev/null; then