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
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user