#!/bin/bash # Diagnostico seguro de una Raspberry Pi del laboratorio. # No muestra credenciales, tokens ni contenido de ficheros .env. set -u echo "== IDENTIDAD ==" hostname cat /etc/os-release | sed -n 's/^\(PRETTY_NAME\)=/\1=/p' echo "== RED ==" hostname -I ip -br addr ip route echo "== TECLADO Y LOCALE ==" localectl status 2>&1 if [ -f /etc/default/keyboard ]; then sed -n '/^XKBMODEL=/p;/^XKBLAYOUT=/p;/^XKBVARIANT=/p;/^XKBOPTIONS=/p' /etc/default/keyboard fi echo "== HORA ==" timedatectl status 2>&1 echo "== SERVICIOS ==" for service in ssh pi-bot autossh-tunel tv-api; do printf '%-16s' "$service" systemctl is-active "$service" 2>/dev/null || true done echo "== RECURSOS ==" uptime free -h df -h / | tail -n 1 if command -v vcgencmd >/dev/null 2>&1; then vcgencmd measure_temp fi