Skip to content

Commit 9445ce1

Browse files
authored
Improve version detection mariadb (hestiacp#2616)
1 parent e819202 commit 9445ce1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/v-list-sys-services

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ if [ -n "$DB_SYSTEM" ] && [ "$DB_SYSTEM" != 'remote' ]; then
243243
proc_name='mysqld'
244244
fi
245245
if [ -f /usr/bin/mysql ]; then
246-
mariadb_v=`mysql -V | awk 'NR==1{print $5}' | head -c 4`
247-
if [ $mariadb_v = "10.5" ] || [ $mariadb_v = "10.6" ] || [ $mariadb_v = "10.7" ]; then
246+
mariadb_v=`mysql -V | awk 'NR==1{print $5}' | head -c 4 | cut -d'.' -f2`
247+
if [ $mariadb_v -ge "5" ]; then
248248
service='mariadb'
249249
proc_name='mariadbd'
250250
fi

0 commit comments

Comments
 (0)