feat(cluster): module Haute Disponibilité (Cluster HA Actif/Passif Keepalived VRRP & Réplication temps réel)
This commit is contained in:
1 parent
bee2055b62
commit
521f21dc9c
10 files changed
+1310
-7
No files matched your search
Executable
+17
@@ -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
|
||||
Reference in new issue
Block a user