mariadb.yml aktualisiert

This commit is contained in:
olli 2024-05-28 13:43:09 +02:00
parent dbf60e2555
commit 06c31d967f

View File

@ -72,6 +72,7 @@
touch ssl/${ssl}.pem
[ -d ssl/${ssl}.pem ] && rm -r ssl/${ssl}.pem
# wait if no cert is available
until [ -s "ssl/${ssl}.pem.new" ]
do
cat /home/docker/traefik/letsencrypt/acme.json | jq -r ".letsencrypt.Certificates[] | select(.domain.main==\"mariadb.{{inventory_hostname}}\") | .${ssl}" | base64 -d >ssl/${ssl}.pem.new
@ -88,11 +89,14 @@
fi
done
chmod 440 ssl/*.pem
chown 999:33 ssl/*.pem
# make it readable for mysql user in the container
chmod 40 ssl/*.pem
chown 999:0 ssl/*.pem
# restart if new cert ist available
if [ -n "$new" ]
then
# wait if mariadb is not finished while initializing
until [ -s "db-data/mysql_upgrade_info" ]
do
sleep 5