Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
1.8 kB · 56 lines
Shell
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657#!/bin/sh# Wrapper to run entry.fish in background so VS Code can connect immediately# The heavy setup continues in background and creates .waiter when done
LOG_DIR="/workspaces/aesthetic-computer/.devcontainer/entry-logs"mkdir -p "$LOG_DIR"TIMESTAMP=$(date +%Y%m%d_%H%M%S)BG_LOG="$LOG_DIR/background-$TIMESTAMP.log"WRAPPER_LOG="$LOG_DIR/wrapper-$TIMESTAMP.log"
# Function to log with timestamplog() { MSG="[$(date '+%H:%M:%S.%3N')] $1" echo "$MSG" echo "$MSG" >> "$WRAPPER_LOG" sync 2>/dev/null}
log "🚀 poststart-wrapper.sh starting"log "📋 Wrapper log: $WRAPPER_LOG"log "📋 Background log: $BG_LOG"log "🖥️ Hostname: $(hostname 2>/dev/null || cat /etc/hostname 2>/dev/null || echo 'unknown')"log "👤 User: $(whoami)"log "📁 PWD: $(pwd)"
# Create a marker so we know wrapper was actually usedtouch "$LOG_DIR/.wrapper-used-$TIMESTAMP"log "✅ Created wrapper marker"
# Run entry.fish in background, redirect output to loglog "🔄 Starting entry.fish in background..."nohup fish /workspaces/aesthetic-computer/.devcontainer/entry.fish > "$BG_LOG" 2>&1 &BG_PID=$!
log "✅ entry.fish started with PID: $BG_PID"
# Create symlinks to latest logsln -sf "$BG_LOG" "$LOG_DIR/latest-background.log"ln -sf "$WRAPPER_LOG" "$LOG_DIR/latest-wrapper.log"log "🔗 Created symlinks to latest logs"
# Give a moment for critical early setup (dockerd, basic env)log "⏳ Waiting 3 seconds for critical setup..."sleep 3
# Check if process is still runningif kill -0 $BG_PID 2>/dev/null; then log "✅ Background process still running (PID: $BG_PID)"else log "⚠️ Background process may have exited early"fi
log "🎉 Wrapper complete - VS Code can now connect"log "📖 Monitor progress: tail -f $BG_LOG"log "🏁 poststart-wrapper.sh finished"