feat(cluster): module Haute Disponibilité (Cluster HA Actif/Passif Keepalived VRRP & Réplication temps réel)

This commit is contained in:
sorcier committed 2026-11-05 14:32:35 +01:00
1 parent bee2055b62
commit 521f21dc9c
10 files changed
+1310 -7

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# ==============================================================================
# NexusPBX HA - Notification Keepalived : Transition vers l'état FAULT / ERREUR
# ==============================================================================
set -euo pipefail
LOG_FILE="/var/log/nexus_cluster.log"
TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')
echo "[$TIMESTAMP] [CLUSTER] [ALERTE] ÉTAT FAULT DÉTECTÉ sur le nœud !" >> "$LOG_FILE"
DB_PATH="/var/www/nexus-pbx/storage/database.sqlite"
if [ -f "$DB_PATH" ]; then
sqlite3 "$DB_PATH" "UPDATE cluster_settings SET last_sync_status='fault', updated_at=CURRENT_TIMESTAMP WHERE id=1;" 2>/dev/null || true
fi
exit 0