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... "
|
printf "🎨 Admin UI... "
|
||||||
cd "$PROJECT_DIR/ui"
|
cd "$PROJECT_DIR/ui"
|
||||||
|
|
||||||
|
UI_STARTED=false
|
||||||
if ! command -v trunk &> /dev/null; then
|
if ! command -v trunk &> /dev/null; then
|
||||||
echo "⚠️ (trunk not installed)"
|
echo "⚠️"
|
||||||
|
echo " Trunk not installed. Run: cargo install trunk"
|
||||||
else
|
else
|
||||||
trunk serve --port "$ADMIN_UI_PORT" > /tmp/supervisor-ui.log 2>&1 &
|
trunk serve --port "$ADMIN_UI_PORT" > /tmp/supervisor-ui.log 2>&1 &
|
||||||
ADMIN_UI_PID=$!
|
ADMIN_UI_PID=$!
|
||||||
sleep 1
|
sleep 1
|
||||||
if ps -p $ADMIN_UI_PID > /dev/null 2>&1; then
|
if ps -p $ADMIN_UI_PID > /dev/null 2>&1; then
|
||||||
echo "✅"
|
echo "✅"
|
||||||
|
UI_STARTED=true
|
||||||
else
|
else
|
||||||
echo "❌"
|
echo "❌"
|
||||||
|
echo " UI failed to start. Check logs: tail -f /tmp/supervisor-ui.log"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "📡 http://$BIND_ADDRESS:$PORT"
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
if [ ! -z "$ADMIN_UI_PID" ] && ps -p $ADMIN_UI_PID > /dev/null 2>&1; then
|
echo "Hero Supervisor Running"
|
||||||
echo "🎨 http://127.0.0.1:$ADMIN_UI_PORT"
|
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
|
fi
|
||||||
echo ""
|
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 for processes
|
||||||
wait
|
wait
|
||||||
Reference in New Issue
Block a user