Kobo: fix nm (:sh au lieu de :exec), logs USB-visibles + marqueurs debug, LC_ALL/policy0

This commit is contained in:
2026-06-15 11:42:53 +02:00
parent 77ee465bd3
commit b4cfb74792
3 changed files with 36 additions and 26 deletions

View File

@@ -1,18 +1,22 @@
#!/bin/sh
# Monitorink — point d'entrée lancé par NickelMenu.
# Configure quelques paramètres puis lance la boucle d'affichage.
export LC_ALL="en_US.UTF-8"
BASE="/mnt/onboard/.adds/Monitorink"
LOG="$BASE/monitorink.log" # sur la partition USB-visible (debug via USB)
cd "$BASE" || exit 1
# --- Configuration (adapter au besoin) ---
export MONITORINK_URL="https://monitorink.homelab.nestor-server.fr/image.png"
export MONITORINK_REFRESH=600
# Gouverneur CPU économe pendant les phases actives.
echo "===== monitorink start $(date) =====" >> "$LOG"
# Gouverneur CPU économe (Libra 2 = policy0 ; fallback générique).
echo ondemand > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor 2>/dev/null
for gov in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
echo ondemand > "$gov" 2>/dev/null
done
# Lance la boucle (journalisée). exec pour ne pas laisser de process orphelin.
exec sh "$BASE/monitorinkloop.sh" >> /tmp/monitorink.log 2>&1
# Lance la boucle, tout est journalisé dans $LOG.
exec sh "$BASE/monitorinkloop.sh" >> "$LOG" 2>&1