Commit d02069a13c42a04d5eff132be394e7a311e56c5a

Authored by Silvan Calarco
1 parent 4b7771218d
Exists in master

kde5-migrate-user-conf: if akonadi >= 5 migrate database backend from QSQLITE3 to QMYSQL

Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff

bin/kde5-migrate-user-conf
... ... @@ -41,4 +41,11 @@
41 41 fi
42 42 done
43 43 touch ~/.kde4/share/.kde5_conf_migrated
  44 +# Switch Akonadi db backend from QSQLITE3 to QMYSQL
  45 +if [ "`akonadictl --version | grep \"Akonadi 5\"`" -a -e ~/.config/akonadi/akonadiserverrc ]; then
  46 + grep -q "^Driver=QSQLITE" ~/.config/akonadi/akonadiserverrc && {
  47 + sed -i "s|^Driver=QSQLITE.*|Driver=QMYSQL|" ~/.config/akonadi/akonadiserverrc
  48 + sed -i "s|^ServerPath=/usr/sbin/mysqld|ServerPath=/usr/bin/mysqld|" ~/.config/akonadi/akonadiserverrc
  49 + }
  50 +fi