auto-sync: 2026-05-22 18:32:45

This commit is contained in:
cfdaily
2026-05-22 18:32:45 +08:00
parent 696fbf2827
commit a05dba3e8f
+4 -4
View File
@@ -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 ✅"