From 8ea8b5dd41ffa0daea550848a906d59ae6afd075 Mon Sep 17 00:00:00 2001 From: Kpa-clawbot <259247574+Kpa-clawbot@users.noreply.github.com> Date: Sat, 28 Mar 2026 01:39:26 -0700 Subject: [PATCH] Fix manage.sh references to Node.js for Go backend Changed all 'Node.js' references to generic 'Server' in: - verify_health() - health check messages - show_container_status() - stats display comment - cmd_status() - service health output The Go backend runs behind Caddy just like the Node version did, so the health checks via docker exec localhost:3000 remain correct. Only the messaging needed updating. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- manage.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/manage.sh b/manage.sh index cb3beaee..45c80529 100755 --- a/manage.sh +++ b/manage.sh @@ -153,7 +153,7 @@ verify_health() { fi # Wait for /api/stats response - info "Waiting for Node.js to respond..." + info "Waiting for server to respond..." local healthy=false for i in $(seq 1 10); do if docker exec "$CONTAINER_NAME" wget -qO- http://localhost:3000/api/stats &>/dev/null; then @@ -164,11 +164,11 @@ verify_health() { done if ! $healthy; then - err "Node.js did not respond after 20 seconds." + err "Server did not respond after 20 seconds." warn "Check logs: ./manage.sh logs" return 1 fi - log "Node.js is responding." + log "Server is responding." # Check for MQTT errors in recent logs local mqtt_errors @@ -675,7 +675,7 @@ show_container_status() { log "${LABEL} (${NAME}): Running — Health: ${health}" docker ps --filter "name=${NAME}" --format " Ports: {{.Ports}}" - # Node.js stats + # Server stats if docker exec "$NAME" wget -qO /dev/null http://localhost:3000/api/stats 2>/dev/null; then local stats packets nodes stats=$(docker exec "$NAME" wget -qO- http://localhost:3000/api/stats 2>/dev/null) @@ -735,14 +735,14 @@ cmd_status() { echo "" info "Service health:" - # Node.js + # Server if docker exec "$CONTAINER_NAME" wget -qO /dev/null http://localhost:3000/api/stats 2>/dev/null; then STATS=$(docker exec "$CONTAINER_NAME" wget -qO- http://localhost:3000/api/stats 2>/dev/null) PACKETS=$(echo "$STATS" | grep -oP '"totalPackets":\K[0-9]+' 2>/dev/null || echo "?") NODES=$(echo "$STATS" | grep -oP '"totalNodes":\K[0-9]+' 2>/dev/null || echo "?") - log " Node.js — ${PACKETS} packets, ${NODES} nodes" + log " Server — ${PACKETS} packets, ${NODES} nodes" else - err " Node.js — not responding" + err " Server — not responding" fi # Mosquitto