Files
wevads-platform/scripts/quick-start.sh
2026-02-26 04:53:11 +01:00

110 lines
3.6 KiB
Bash
Executable File

#!/bin/bash
echo "=== 🚀 WEVADS ARSENAL - DÉMARRAGE RAPIDE ==="
echo "Version: 2.0.0 Final"
echo "Date: $(date)"
echo ""
echo "🔍 Vérification du système..."
echo ""
# Vérifier les services
echo "1. Services système:"
services=("apache2" "postgresql" "redis-server" "pmta")
all_ok=true
for service in "${services[@]}"; do
status=$(systemctl is-active "$service" 2>/dev/null || echo "unknown")
if [ "$status" = "active" ]; then
echo "$service: $status"
else
echo " ⚠️ $service: $status"
all_ok=false
fi
done
echo ""
echo "2. Vérification des endpoints clés:"
endpoints=(
"dashboard.php"
"arsenal-dashboard.html"
"system-dashboard.html"
"brain-unified-send.html"
"sms-send-engine.html"
"phone-generator.html"
)
for endpoint in "${endpoints[@]}"; do
if curl -s -o /dev/null -w "%{http_code}" "http://127.0.0.1:5821/$endpoint" | grep -q "200"; then
echo "$endpoint: ACCESSIBLE"
else
echo "$endpoint: INACCESSIBLE"
all_ok=false
fi
done
echo ""
echo "3. Vérification des APIs:"
apis=(
"api/monitor.php"
"api/arsenal-health.php"
"deliverads/brain-unified-send.php?action=stats"
)
for api in "${apis[@]}"; do
if curl -s "http://127.0.0.1:5821/$api" | grep -q "success\|status\|OPERATIONAL"; then
echo "$api: FONCTIONNELLE"
else
echo " ⚠️ $api: PROBLÈME DÉTECTÉ"
fi
done
echo ""
echo "4. Vérification de la base de données:"
if PGPASSWORD=admin123 psql -h localhost -U admin -d adx_system -c "SELECT 1" >/dev/null 2>&1; then
echo " ✅ Base de données: CONNECTÉE"
# Récupérer quelques stats
configs=$(PGPASSWORD=admin123 psql -h localhost -U admin -d adx_system -t -c "SELECT COUNT(*) FROM brain_configs WHERE is_active = true;" 2>/dev/null | tr -d ' \n')
winners=$(PGPASSWORD=admin123 psql -h localhost -U admin -d adx_system -t -c "SELECT COUNT(*) FROM brain_winners WHERE is_active = true;" 2>/dev/null | tr -d ' \n')
echo " 📊 Configurations actives: $configs"
echo " 🏆 Brain Winners actifs: $winners"
else
echo " ❌ Base de données: NON CONNECTÉE"
all_ok=false
fi
echo ""
echo "=== 📊 RÉSULTATS DU DÉMARRAGE ==="
if [ "$all_ok" = true ]; then
echo "✅ SYSTÈME COMPLÈTEMENT OPÉRATIONNEL !"
echo ""
echo "🎯 L'ARSENAL WEVADS EST PRÊT POUR :"
echo " 1. Campagnes d'emailing massives"
echo " 2. Envoi de SMS via multi-fournisseurs"
echo " 3. Génération de numéros internationaux"
echo " 4. Monitoring temps réel"
echo " 5. Gestion complète d'infrastructure"
echo ""
echo "🔗 ACCÈS PRINCIPAL :"
echo " Dashboard: http://127.0.0.1:5821/dashboard.php"
echo " Arsenal: http://127.0.0.1:5821/arsenal-dashboard.html"
echo " Monitoring: http://127.0.0.1:5821/system-dashboard.html"
echo " SMS Engine: http://127.0.0.1:5821/sms-send-engine.html"
echo " Phone Generator: http://127.0.0.1:5821/phone-generator.html"
echo ""
echo "📈 PROCHAINES ÉTAPES RECOMMANDÉES :"
echo " 1. Tester une petite campagne email"
echo " 2. Valider l'envoi SMS avec un numéro test"
echo " 3. Générer une liste de numéros pour tests"
echo " 4. Explorer les différents dashboards"
else
echo "⚠️ PROBLÈMES DÉTECTÉS"
echo " Veuillez vérifier les services mentionnés ci-dessus."
echo " Contact: sysadmin@wevads.com"
fi
echo ""
echo "🕒 Prochaine vérification automatique dans 5 minutes."
echo "📋 Rapport complet: http://127.0.0.1:5821/deployment-report.json"