refactor(discovery): use ping for discovery and fill MAC via SSH

This commit is contained in:
12600k-rog-d4
2026-08-12 21:45:51 +08:00
parent 906bb54aaa
commit 175c5e8c6c
21 changed files with 542 additions and 310 deletions

View File

@@ -0,0 +1,12 @@
echo '===MONITOR:temp==='
if [ -f "$TEMP_LOG" ] && [ -s "$TEMP_LOG" ]; then
echo 'status:pass'
TEMP_MAX=$(grep -oP '\d+\.?\d*°C' "$TEMP_LOG" | sort -t. -k1 -n | tail -1 || echo 'unknown')
echo "samples:$(wc -l < "$TEMP_LOG")"
echo "max:${TEMP_MAX}"
echo "output:$(tail -10 "$TEMP_LOG")"
else
echo 'status:skip'
fi
echo ''
kill $TEMP_PID 2>/dev/null || true