05-sep: [infra] configurar Raspberry Pi y documentar flota

This commit is contained in:
juanjo
2026-09-05 15:46:47 +02:00
parent 1e0ed24663
commit 770b9f7ee2
6 changed files with 311 additions and 8 deletions

View File

@@ -0,0 +1,36 @@
#!/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