26 lines
1020 B
Bash
Executable File
26 lines
1020 B
Bash
Executable File
#!/bin/sh
|
|
# Monitorink — point d'entrée lancé par NickelMenu.
|
|
export LC_ALL="en_US.UTF-8"
|
|
# PATH complet : l'environnement NickelMenu est minimal (curl/ip absents sinon).
|
|
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
|
|
|
|
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) ---
|
|
# HTTP direct vers l'IP du homelab (busybox wget, pas de curl/DNS/TLS requis).
|
|
export MONITORINK_URL="http://192.168.0.43:8899/image.png"
|
|
export MONITORINK_REFRESH=600
|
|
|
|
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, tout est journalisé dans $LOG.
|
|
exec sh "$BASE/monitorinkloop.sh" >> "$LOG" 2>&1
|