chore: fix

This commit is contained in:
2026-05-04 22:08:36 +02:00
parent 4dcc0519a2
commit 3a32b00766
5 changed files with 35 additions and 33 deletions
+5 -15
View File
@@ -8,27 +8,17 @@ mkdir -p "$CERTS_DIR"
cd /tmp
echo "[*] Téléchargement de l'outil de génération de certificats Wazuh..."
curl -sO https://packages.wazuh.com/4.9/wazuh-certs-tool.sh
curl -sO https://packages.wazuh.com/4.14/wazuh-certs-tool.sh
cp "$SCRIPT_DIR/config/certs.yml" config.yml
echo "[*] Génération des certificats..."
bash wazuh-certs-tool.sh -A
echo "[*] Extraction des certificats..."
tar -xf wazuh-install-files.tar
cp wazuh-install-files/wazuh.indexer.pem "$CERTS_DIR/"
cp wazuh-install-files/wazuh.indexer-key.pem "$CERTS_DIR/"
cp wazuh-install-files/wazuh.manager.pem "$CERTS_DIR/"
cp wazuh-install-files/wazuh.manager-key.pem "$CERTS_DIR/"
cp wazuh-install-files/wazuh.dashboard.pem "$CERTS_DIR/"
cp wazuh-install-files/wazuh.dashboard-key.pem "$CERTS_DIR/"
cp wazuh-install-files/root-ca.pem "$CERTS_DIR/"
cp wazuh-install-files/root-ca.pem "$CERTS_DIR/root-ca-manager.pem"
cp wazuh-install-files/admin.pem "$CERTS_DIR/"
cp wazuh-install-files/admin-key.pem "$CERTS_DIR/"
echo "[*] Copie des certificats..."
cp /tmp/wazuh-certificates/*.pem "$CERTS_DIR/"
cp /tmp/wazuh-certificates/root-ca.pem "$CERTS_DIR/root-ca-manager.pem"
chmod 640 "$CERTS_DIR"/*.pem
rm -rf /tmp/wazuh-install-files /tmp/wazuh-install-files.tar /tmp/wazuh-certs-tool.sh /tmp/config.yml
rm -rf /tmp/wazuh-certificates /tmp/wazuh-install-files /tmp/wazuh-install-files.tar /tmp/wazuh-certs-tool.sh /tmp/config.yml
echo "[OK] Certificats générés dans $CERTS_DIR"