Update mysql upgrade function
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Wed, 4 Oct 2017 09:12:16 +0000 (11:12 +0200)
committerValentin Vidic <Valentin.Vidic@CARNet.hr>
Wed, 4 Oct 2017 09:36:15 +0000 (11:36 +0200)
src/actions/main.queue
src/functions.sh

index 4b4bfa1..e24a773 100644 (file)
@@ -31,7 +31,7 @@ true                          debconf_preload
 pkg munin-cn                   upgrade_munin
 # konacno, instalacija novih paketa
 pkg amavisd-new                        upgrade_amavis
-pkg mysql-server-5.1           upgrade_mysql
+true                           upgrade_mysql
 pkg apache2-cn                 upgrade_apache2
 pkg postfix-cn                 upgrade_postfix
 pkg dovecot-cn                 upgrade_dovecot
index 4a5de69..61ca1db 100644 (file)
@@ -908,12 +908,14 @@ upgrade_amavis () {
   /etc/init.d/amavis restart
 }
 
-# handle mysql 5.0 to 5.1 upgrade
+# handle mysql upgrade
 upgrade_mysql () {
-  if pkg mysql-server || pkg mysql-server-5.1; then
-     pkgadd mysql-server
-     dpkg -P mysql-server-5.1
-     /etc/init.d/mysql restart
+  if pkg mysql-server || pkg mysql-server-5.5 || \
+     pkg mariadb-server || pkg mariadb-server-10.0
+  then
+     pkgadd default-mysql-server
+     dpkg -P mysql-server mysql-server-5.5 mariadb-server-10.0
+     service mysql restart
   fi
 }