18 lines
345 B
Bash
18 lines
345 B
Bash
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
APP_ENV="${APP_ENV:-staging}"
|
|
|
|
if [ "$APP_ENV" = "live" ]; then
|
|
SCRIPT="/app/live/tools/pi_control/terminal_entry.sh"
|
|
else
|
|
SCRIPT="/app/staging/tools/pi_control/terminal_entry.sh"
|
|
fi
|
|
|
|
if [ ! -f "$SCRIPT" ]; then
|
|
echo "terminal_entry.sh not found at $SCRIPT"
|
|
exit 1
|
|
fi
|
|
|
|
exec ttyd --writable --url-arg "$SCRIPT"
|