From 883794c58052af65da1aff1fcae60036d9ed663b Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Tue, 26 Sep 2023 18:59:06 +0200 Subject: [PATCH] implement a check to test if the databse has been created --- imageroot/systemd/user/mariadb-app.service | 1 + 1 file changed, 1 insertion(+) diff --git a/imageroot/systemd/user/mariadb-app.service b/imageroot/systemd/user/mariadb-app.service index fbc2863..a95fd86 100644 --- a/imageroot/systemd/user/mariadb-app.service +++ b/imageroot/systemd/user/mariadb-app.service @@ -28,6 +28,7 @@ ExecStart=/usr/bin/podman run --conmon-pidfile %t/mariadb-app.pid \ ${MARIADB_IMAGE} \ --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci ExecStartPost=/usr/bin/podman exec mariadb-app /bin/bash -c 'printf "[client] \npassword=Nethesis,1234" > /root/.my.cnf' +ExecStartPost=/usr/bin/podman exec mariadb-app /bin/bash -c "while ! mysql -h localhost -P 3306 -u roundcubemail --password=roundcubemail roundcubemail -e 'select * from roundcubemail.cache roundcubemail;'; do sleep 1; done" ExecStop=/usr/bin/podman stop --ignore --cidfile %t/mariadb-app.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/mariadb-app.ctr-id ExecReload=/usr/bin/podman kill -s HUP mariadb-app