From 4ccc76a6ad7b14cd42bbfe635acf66c5eb0e88e6 Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Sun, 6 Sep 2026 07:11:41 +0000 Subject: [PATCH] Ajouter cookcli/rootfs/etc/cont-init.d/00-env-check.sh --- .../rootfs/etc/cont-init.d/00-env-check.sh | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 cookcli/rootfs/etc/cont-init.d/00-env-check.sh diff --git a/cookcli/rootfs/etc/cont-init.d/00-env-check.sh b/cookcli/rootfs/etc/cont-init.d/00-env-check.sh new file mode 100644 index 0000000..b7a3dbd --- /dev/null +++ b/cookcli/rootfs/etc/cont-init.d/00-env-check.sh @@ -0,0 +1,33 @@ +#!/usr/bin/with-contenv bashio +set -e + +bashio::log.info "=== DIAGNOSTIC DE L'ENVIRONNEMENT ===" + +bashio::log.info "1. Variables d'environnement:" +bashio::log.info " PATH: ${PATH}" +bashio::log.info " HOME: ${HOME}" +bashio::log.info " USER: ${USER}" + +bashio::log.info "2. Commandes disponibles (avec which):" +for cmd in date bash sh nginx git curl cook; do + if which "$cmd" >/dev/null 2>&1; then + bashio::log.info " ✅ $cmd: $(which $cmd)" + else + bashio::log.warning " ⚠️ $cmd: introuvable" + fi +done + +bashio::log.info "3. Contenu de /usr/bin/ (extrait):" +ls -la /usr/bin/ | head -10 + +bashio::log.info "4. Test de la commande 'date' directe:" +date && bashio::log.info " ✅ date fonctionne" || bashio::log.error " ❌ date ne fonctionne PAS" + +bashio::log.info "5. Type de l'add-on:" +if [ -f /usr/lib/bashio/bashio ]; then + bashio::log.info " ✅ bashio trouvé" +else + bashio::log.error " ❌ bashio non trouvé" +fi + +bashio::log.info "=== FIN DU DIAGNOSTIC ===" \ No newline at end of file