Jean-Philippe Pialasse de0996e198 * Fri Mar 07 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-9.sme
- upgrade to support mariadb 11.4 [SME: 12930]
  move mariadb-upgrade to mysql.init unit
  remove duplicate in 00_restore_dumped_dbs and 10mysql_upgrade,
  add a tmp.d for pid file, add post action dnf script
  update mariadb.service.d/ content, set default to utfmb4
- mysql.user table filtering [SME: 12592]

* Sun Jan 26 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-8.sme
- prestart script requires daemontools bins [SME: 12566]
2025-03-08 23:59:18 -05:00

18 lines
538 B
Bash

#!/bin/sh
status=$(/sbin/e-smith/config getprop mariadb status)
if [ "$status" = "disabled" ]
then
echo "mysqld is disabled - no tables restored" >&2
exit 0
fi
/bin/rm -f /home/e-smith/db/mysql/information_schema.dump
/bin/rm -f /home/e-smith/db/mysql/performance_schema.dump
if [ ! -f /var/lib/mysql/mysql/user.frm ]
then
for db in $(ls /home/e-smith/db/mysql/*.dump 2> /dev/null | grep -v '/mysql.dump'| grep -v '/mysql.privileges.dump')
do
mv $db /etc/e-smith/sql/init/01_$(basename $db .dump).sql
done
fi