From a05dba3e8f443c67c9e5c3d7d7790c565cc4b531 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Fri, 22 May 2026 18:32:45 +0800 Subject: [PATCH] auto-sync: 2026-05-22 18:32:45 --- scripts/status.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/status.sh b/scripts/status.sh index 7d282ce..b64782c 100755 --- a/scripts/status.sh +++ b/scripts/status.sh @@ -40,10 +40,10 @@ fi echo "" if pm2 describe "$PM2_NAME" >/dev/null 2>&1; then PM2_DESC=$(pm2 describe "$PM2_NAME" 2>/dev/null) - STATUS=$(echo "$PM2_DESC" | grep "status" | head -1 | awk '{print $NF}') - PID=$(echo "$PM2_DESC" | grep -E "^\\│ pid " | head -1 | awk '{print $NF}') - UPTIME=$(echo "$PM2_DESC" | grep "uptime" | head -1 | sed 's/.*│ //' | sed 's/ *│.*//') - RESTARTS=$(echo "$PM2_DESC" | grep "restarts" | head -1 | awk '{print $NF}') + STATUS=$(echo "$PM2_DESC" | grep "status" | head -1 | sed 's/.*│ *//' | sed 's/ *│.*//') + PID=$(echo "$PM2_DESC" | grep -E "^\\│ pid " | head -1 | sed 's/.*│ *//' | sed 's/ *│.*//') + UPTIME=$(echo "$PM2_DESC" | grep "uptime" | head -1 | sed 's/.*│ *//' | sed 's/ *│.*//') + RESTARTS=$(echo "$PM2_DESC" | grep "restarts" | head -1 | sed 's/.*│ *//' | sed 's/ *│.*//') if [ "$STATUS" = "online" ]; then echo " PM2: online ✅"