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