From 4c49cf8e1c60bbf26fdd8192aeb4d6fdd00e74bf Mon Sep 17 00:00:00 2001 From: sorcier Date: Thu, 5 Nov 2026 19:55:15 +0100 Subject: [PATCH] feat(installer): integrate full HA Keepalived setup, sysctl, sudoers and cluster helper into install.sh --- install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install.sh b/install.sh index fb07033..1361e5e 100755 --- a/install.sh +++ b/install.sh @@ -66,6 +66,8 @@ apt-get install -y --no-install-recommends \ # Composants optionnels Haute Disponibilité (Cluster HA) apt-get install -y --no-install-recommends keepalived 2>/dev/null || true +systemctl stop keepalived >/dev/null 2>&1 || true +systemctl disable keepalived >/dev/null 2>&1 || true # Vérification et installation d'Asterisk echo -e "${C_GREEN} -> Installation du moteur Asterisk PBX...${C_RESET}" @@ -494,6 +496,14 @@ ln -sf "$TARGET_DIR/scripts/nexus-banner.sh" /usr/local/bin/nexus-banner ln -sf "$TARGET_DIR/scripts/update.sh" /usr/local/bin/nexus-update ln -sf "$TARGET_DIR/scripts/nexus-cluster" /usr/local/bin/nexus-cluster +# Pré-déploiement sécurisé des scripts Keepalived +if [ -d "$TARGET_DIR/scripts/cluster" ]; then + cp -f "$TARGET_DIR/scripts/cluster/"*.sh /etc/keepalived/scripts/ 2>/dev/null || true + chown -R root:root /etc/keepalived + chmod 755 /etc/keepalived /etc/keepalived/scripts + chmod 755 /etc/keepalived/scripts/*.sh 2>/dev/null || true +fi + # Bannière interactive lors de chaque connexion terminal (SSH / Console) cat << 'EOF' > /etc/profile.d/nexus-motd.sh #!/bin/sh