Skip to content

Commit

Permalink
Merge pull request #27 from NethServer/mariadb_check
Browse files Browse the repository at this point in the history
implement a check to test if mysql is alive
  • Loading branch information
stephdl committed Sep 27, 2023
2 parents 4e6e9c5 + 19825be commit 1aa19d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions imageroot/systemd/user/mariadb-app.service
Original file line number Diff line number Diff line change
Expand Up @@ -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 ! mysqladmin ping -h localhost -P 3306 -u root; 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
Expand Down

0 comments on commit 1aa19d0

Please sign in to comment.