Skip to content

Commit

Permalink
Merge pull request #2390 from buxjr311/patch-3
Browse files Browse the repository at this point in the history
Update v-list-sys-services
  • Loading branch information
ScIT-Raphael committed Feb 22, 2022
2 parents 07d3763 + ada5eb2 commit 4e0c670
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions bin/v-list-sys-services
Expand Up @@ -230,19 +230,24 @@ if [ -n "$DB_SYSTEM" ] && [ "$DB_SYSTEM" != 'remote' ]; then
service="$db"
proc_name=''
if [ "$service" = 'mysql' ]; then
if [ -d "/etc/sysconfig" ]; then
mysql_version=$(mysql -V)
mariadb_string="MariaDB"
if [[ ! $mysql_version =~ $mariadb_string ]]; then
# MySQL
service='mysqld'
proc_name='mysqld'
fi
if [ -e "/lib/systemd/system/mariadb.service" ]; then
service='mariadb'
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" ]; then
else
# MariaDB
if [ -e "/lib/systemd/system/mariadb.service" ]; then
service='mariadb'
proc_name='mariadbd'
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" ]; then
service='mariadb'
proc_name='mariadbd'
fi
fi
fi
fi
Expand Down

0 comments on commit 4e0c670

Please sign in to comment.