#!/bin/bash # Script de test de progression pour BlindBit # Vérifier si le processus BlindBit est en cours d'exécution if pgrep blindbit > /dev/null 2>/dev/null; then # Vérifier l'API if wget -q --spider http://localhost:8000/tweaks/1 2>/dev/null; then echo 'BlindBit ready: Oracle service responding' exit 0 else # Récupérer les logs récents pour voir la progression scan_logs=$(tail -20 /var/log/blindbit/blindbit.log 2>/dev/null | grep -E "(scanning|scan|blocks|tweaks|processing)" | tail -1 || echo "") if [ -n "$scan_logs" ]; then echo "BlindBit processing: $scan_logs" exit 1 else echo 'BlindBit starting: Oracle service initializing' exit 1 fi fi else echo 'BlindBit starting: Process not ready' exit 1 fi