mariadb/templates/mysql_upgrade.sh.tpl

17 lines
253 B
Smarty

#!/bin/sh
set -euo pipefail
COUNT=0
while true; do
if mysqladmin ping; then
echo "MariaDB is ready, running mysql_upgrade"
mysql_upgrade
exit 0
fi
echo "MariaDB not ready yet, waiting a bit more"
COUNT=$((COUNT+1))
sleep 1
done