From 32a68ba9f41e053001c8097603394cfb405f3fef Mon Sep 17 00:00:00 2001 From: cfdaily Date: Fri, 22 May 2026 18:28:50 +0800 Subject: [PATCH] auto-sync: 2026-05-22 18:28:50 --- scripts/status.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/status.sh b/scripts/status.sh index e14e700..06fbaca 100755 --- a/scripts/status.sh +++ b/scripts/status.sh @@ -132,9 +132,12 @@ fi if [ "$DETAILED" = true ]; then echo "" echo " Config:" - echo " Port: $(grep -o 'port:.*' "$TARGET_DIR/config/default.yaml" 2>/dev/null | head -1 || echo '8083 (default)')" - echo " Interval: $(grep -o 'interval:.*' "$TARGET_DIR/config/default.yaml" 2>/dev/null | head -1)" - echo " Agents: $(grep 'agents:' -A 20 "$TARGET_DIR/config/default.yaml" 2>/dev/null | grep ' - ' | wc -l | tr -d ' ') configured" + PORT_VAL=$(grep -o 'port:.*' "$TARGET_DIR/config/default.yaml" 2>/dev/null | head -1) + echo " Port: ${PORT_VAL:-8083 (default)}" + INTERVAL_VAL=$(grep -o 'interval:.*' "$TARGET_DIR/config/default.yaml" 2>/dev/null | head -1) + echo " Interval: ${INTERVAL_VAL:-30s}" + AGENT_COUNT=$(grep 'agents:' -A 20 "$TARGET_DIR/config/default.yaml" 2>/dev/null | grep ' - ' | wc -l | tr -d ' ') + echo " Agents: ${AGENT_COUNT:-0} configured" fi echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"