#!/bin/bash # ============================================ # Super Advanced Terminal - Startup Script # Starts: Nginx + ttyd + code-server # ============================================ set -e echo "============================================" echo " Starting Super Advanced Terminal v2.0" echo "============================================" # Create workspace directory mkdir -p ~/workspace # Create temp dirs for nginx mkdir -p /tmp/nginx_client_body /tmp/nginx_proxy /tmp/nginx_fastcgi /tmp/nginx_uwsgi /tmp/nginx_scgi # ---- Start code-server in background ---- echo "[1/3] Starting VS Code Server on :8080..." code-server \ --bind-addr 0.0.0.0:8080 \ --auth none \ --disable-telemetry \ --disable-update-check \ --app-name "Super Terminal IDE" \ ~/workspace & sleep 2 # ---- Start ttyd in background ---- echo "[2/3] Starting ttyd terminal on :7681..." ttyd \ -W \ -p 7681 \ -t fontSize=15 \ -t fontFamily="'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace" \ -t theme='{"background":"#1a1b26","foreground":"#c0caf5","cursor":"#c0caf5","cursorAccent":"#1a1b26","selection":"#33467C","black":"#15161E","red":"#f7768e","green":"#9ece6a","yellow":"#e0af68","blue":"#7aa2f7","magenta":"#bb9af7","cyan":"#7dcfff","white":"#a9b1d6","brightBlack":"#414868","brightRed":"#f7768e","brightGreen":"#9ece6a","brightYellow":"#e0af68","brightBlue":"#7aa2f7","brightMagenta":"#bb9af7","brightCyan":"#7dcfff","brightWhite":"#c0caf5"}' \ zsh & sleep 1 # ---- Start Nginx in foreground ---- echo "[3/3] Starting Nginx reverse proxy on :7860..." echo "" echo "============================================" echo " All services started successfully!" echo " Terminal: http://localhost:7860/" echo " VS Code: http://localhost:7860/code/" echo "============================================" nginx -c /etc/nginx/nginx.conf -g 'daemon off;'