Add listen to Unix websocket (#484)

This commit is contained in:
Thomas Miceli
2025-08-01 17:34:52 +02:00
committed by GitHub
parent b18cdb9188
commit 979b302e4c
6 changed files with 190 additions and 51 deletions

View File

@@ -1,8 +1,23 @@
#!/bin/sh
set -euo pipefail
# Start background processes
make watch_frontend &
make watch_backend &
FRONTEND_PID=$!
trap 'kill $(jobs -p)' EXIT
wait
make watch_backend &
BACKEND_PID=$!
# Function for graceful shutdown
cleanup() {
echo "Shutting down gracefully..."
kill -TERM $FRONTEND_PID $BACKEND_PID 2>/dev/null || true
wait $FRONTEND_PID $BACKEND_PID 2>/dev/null || true
echo "Shutdown complete"
}
# Set up trap for graceful shutdown
trap cleanup EXIT INT TERM
# Wait for background processes
wait