Browse Source

Improve version detection mariadb (#2616)

Jaap Marcus 3 years ago
parent
commit
9445ce1324
1 changed files with 2 additions and 2 deletions
  1. 2 2
      bin/v-list-sys-services

+ 2 - 2
bin/v-list-sys-services

@@ -243,8 +243,8 @@ if [ -n "$DB_SYSTEM" ] && [ "$DB_SYSTEM" != 'remote' ]; then
                     proc_name='mysqld'
                 fi
                 if [ -f /usr/bin/mysql ]; then
-                    mariadb_v=`mysql -V | awk 'NR==1{print $5}' | head -c 4`
-                    if [ $mariadb_v = "10.5" ] || [ $mariadb_v = "10.6" ] || [ $mariadb_v = "10.7" ]; then
+                    mariadb_v=`mysql -V | awk 'NR==1{print $5}' | head -c 4 | cut -d'.' -f2`
+                    if [ $mariadb_v -ge "5" ]; then
                         service='mariadb'
                         proc_name='mariadbd'
                     fi