Add WOL auto-start scripts and documentation
- check-services.sh: Verify all services after WOL - start-all-services.sh: Start all containers after boot - WOL-ET-DEMARRAGE-AUTO.md: Complete guide for auto-start - Ensure ComfyUI starts automatically with Docker
This commit is contained in:
Executable
+72
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
# Script de vérification des services Effi après WOL
|
||||
# À exécuter sur folzo-Corp après réveil du PC
|
||||
|
||||
echo "================================"
|
||||
echo "Vérification des services Effi"
|
||||
echo "================================"
|
||||
echo ""
|
||||
|
||||
# Fonction de vérification
|
||||
check_service() {
|
||||
local name=$1
|
||||
local url=$2
|
||||
|
||||
echo -n "Vérification $name... "
|
||||
if curl -s "$url" > /dev/null 2>&1; then
|
||||
echo "✅ OK"
|
||||
return 0
|
||||
else
|
||||
echo "❌ KO"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Vérifier les services
|
||||
check_service "Ollama" "http://localhost:11434"
|
||||
check_service "ComfyUI" "http://localhost:8188"
|
||||
check_service "Effi-STT" "http://localhost:8200/health"
|
||||
check_service "openedai-speech" "http://localhost:8100/health"
|
||||
|
||||
echo ""
|
||||
echo "================================"
|
||||
echo "Vérification Docker"
|
||||
echo "================================"
|
||||
echo ""
|
||||
|
||||
# Vérifier Docker
|
||||
if ! systemctl is-active --quiet docker; then
|
||||
echo "Docker n'est pas démarré ! Démarrage..."
|
||||
sudo systemctl start docker
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
# Vérifier les conteneurs
|
||||
echo "Conteneurs Docker :"
|
||||
sudo docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
|
||||
|
||||
echo ""
|
||||
echo "================================"
|
||||
|
||||
# Redémarrer les services si nécessaire
|
||||
if ! check_service "ComfyUI" "http://localhost:8188"; then
|
||||
echo ""
|
||||
echo "Redémarrage de ComfyUI..."
|
||||
cd ~/Documents/OpenCode/Projets/Effi/comfyui
|
||||
sudo docker compose up -d
|
||||
echo "ComfyUI redémarré !"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "================================"
|
||||
echo "Résumé"
|
||||
echo "================================"
|
||||
echo ""
|
||||
echo "Si un service est KO :"
|
||||
echo " - Ollama: sudo docker start ollama"
|
||||
echo " - ComfyUI: cd ~/Documents/OpenCode/Projets/Effi/comfyui && sudo docker compose up -d"
|
||||
echo " - Effi-STT: cd ~/Documents/OpenCode/Projets/Effi/effi-stt && sudo docker compose up -d"
|
||||
echo " - openedai-speech: cd ~/openedai-speech && sudo docker compose up -d"
|
||||
echo ""
|
||||
echo "Pour tout redémarrer:"
|
||||
echo " ~/Documents/OpenCode/Projets/Effi/scripts/start-all-services.sh"
|
||||
Reference in New Issue
Block a user