mariadb.yml aktualisiert

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

View File

@ -71,7 +71,8 @@
do do
touch ssl/${ssl}.pem touch ssl/${ssl}.pem
[ -d ssl/${ssl}.pem ] && rm -r ssl/${ssl}.pem [ -d ssl/${ssl}.pem ] && rm -r ssl/${ssl}.pem
# wait if no cert is available
until [ -s "ssl/${ssl}.pem.new" ] until [ -s "ssl/${ssl}.pem.new" ]
do 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 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 fi
done done
chmod 440 ssl/*.pem # make it readable for mysql user in the container
chown 999:33 ssl/*.pem chmod 40 ssl/*.pem
chown 999:0 ssl/*.pem
# restart if new cert ist available
if [ -n "$new" ] if [ -n "$new" ]
then then
# wait if mariadb is not finished while initializing
until [ -s "db-data/mysql_upgrade_info" ] until [ -s "db-data/mysql_upgrade_info" ]
do do
sleep 5 sleep 5