From 0df5956575a32a2fc33a0ec9f593e9642917906b Mon Sep 17 00:00:00 2001 From: Timur Gordon <31495328+timurgordon@users.noreply.github.com> Date: Fri, 7 Nov 2025 00:21:30 +0100 Subject: [PATCH] Improve run script output with better error messages and summary - Show helpful error message when Admin UI fails with log location - Add summary section with all URLs and log file locations - Better visual separation with dividers - Clear instructions for viewing logs --- scripts/run.sh | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/scripts/run.sh b/scripts/run.sh index 75645ba..7f38e04 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -114,26 +114,40 @@ echo "✅" printf "🎨 Admin UI... " cd "$PROJECT_DIR/ui" +UI_STARTED=false if ! command -v trunk &> /dev/null; then - echo "⚠️ (trunk not installed)" + echo "⚠️" + echo " Trunk not installed. Run: cargo install trunk" else trunk serve --port "$ADMIN_UI_PORT" > /tmp/supervisor-ui.log 2>&1 & ADMIN_UI_PID=$! sleep 1 if ps -p $ADMIN_UI_PID > /dev/null 2>&1; then echo "✅" + UI_STARTED=true else echo "❌" + echo " UI failed to start. Check logs: tail -f /tmp/supervisor-ui.log" fi fi echo "" -echo "📡 http://$BIND_ADDRESS:$PORT" -if [ ! -z "$ADMIN_UI_PID" ] && ps -p $ADMIN_UI_PID > /dev/null 2>&1; then - echo "🎨 http://127.0.0.1:$ADMIN_UI_PORT" +echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" +echo "Hero Supervisor Running" +echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" +echo "📡 OpenRPC Server: http://$BIND_ADDRESS:$PORT" +if [ "$UI_STARTED" = true ]; then + echo "🎨 Admin UI: http://127.0.0.1:$ADMIN_UI_PORT" fi echo "" -echo "Press Ctrl+C to stop" +echo "Logs:" +echo " Supervisor: tail -f /tmp/supervisor-run.log" +if [ "$UI_STARTED" = true ]; then + echo " Admin UI: tail -f /tmp/supervisor-ui.log" +fi +echo "" +echo "Press Ctrl+C to stop all services" +echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" # Wait for processes wait \ No newline at end of file