fix entrypoint for certs builder

This commit is contained in:
vcerenu
2022-04-07 15:20:47 -03:00
parent ea9e03485c
commit 928bf657e9
3 changed files with 7 additions and 8 deletions
+7 -6
View File
@@ -28,13 +28,19 @@ else
exit 1
fi
cp /certificates/certs.yml /config.yml
chmod 700 /$CERT_TOOL
##############################################################################
# Creating Cluster certificates
##############################################################################
/$CERT_TOOL -A
## Execute cert tool and parsin cert.yml to set UID permissions
source /$CERT_TOOL -A
nodes_server=$( cert_parseYaml /config.yml | grep nodes_server_name | sed 's/nodes_server_name=//' )
arr=($nodes_server)
echo "Moving created certificates to destination directory"
cp /wazuh-certificates/* /certificates/
echo "changing certificate permissions"
@@ -48,11 +54,6 @@ cp /certificates/root-ca.key /certificates/root-ca-manager.key
chown 999:997 /certificates/root-ca-manager.pem
chown 999:997 /certificates/root-ca-manager.key
## Parsin cert.yml to set UID permissions
source /$CERT_TOOL
nodes_server=$( cert_parseYaml /certificates/certs.yml | grep nodes_server_name | sed 's/nodes_server_name=//' )
arr=($nodes_server)
for i in ${arr[@]};
do
chown 999:997 "/certificates/${i}.pem"
-1
View File
@@ -6,5 +6,4 @@ services:
image: wazuh/wazuh-certs-generator:0.0.1
hostname: wazuh-certs-generator
volumes:
- ./config/wazuh_indexer_ssl_certs/certs.yml:/config.yml
- ./config/wazuh_indexer_ssl_certs/:/certificates/
-1
View File
@@ -6,5 +6,4 @@ services:
image: wazuh/wazuh-certs-generator:0.0.1
hostname: wazuh-certs-generator
volumes:
- ./config/wazuh_indexer_ssl_certs/certs.yml:/config.yml
- ./config/wazuh_indexer_ssl_certs/:/certificates/