fix create_certs function

This commit is contained in:
Luis Guzmán 2023-12-05 00:44:55 -06:00
parent 65092c6665
commit 3f8d78b0bb
1 changed files with 5 additions and 4 deletions

View File

@ -35,7 +35,7 @@ install_if_not() {
grep -c "ok installed")" == "1" ]; then grep -c "ok installed")" == "1" ]; then
echo " $1 is installed, skipping..." echo " $1 is installed, skipping..."
else else
printf "\n---- Installing %s ----" "$1" printf "\n---- Installing %s ----\n" "$1"
apt-get -yq2 install "$1" apt-get -yq2 install "$1"
fi fi
} }
@ -64,8 +64,9 @@ dig_dns_ip() {
create_certs() { create_certs() {
cp static/opensearch_certs.sh "$OPNSDIR" cp static/opensearch_certs.sh "$OPNSDIR"
sed -i "s|__FTSDOMAIN__|$1|" "$OPNSDIR"/opensearch_certs.sh sed -i "s|__FTSDOMAIN__|$1|" "$OPNSDIR"/opensearch_certs.sh
cp "$OPNSDIR" cd "$OPNSDIR"
bash opensearch_certs.sh bash opensearch_certs.sh
rm -f "$OPNSDIR"/opensearch_certs.sh
} }
countdown() { countdown() {
printwc "$Cyan" "$1" printwc "$Cyan" "$1"
@ -330,4 +331,4 @@ docker-compose exec fts_os-node \
docker logs $fts_node docker logs $fts_node
echo "You can now use: \"http://${INDEX_USER}:${OPNSREST}@localhost:9200\"" printwc "$Green" "\n\nYou can now use: \"http://${INDEX_USER}:${OPNSREST}@localhost:9200\"\n"