File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed
Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -230,19 +230,24 @@ if [ -n "$DB_SYSTEM" ] && [ "$DB_SYSTEM" != 'remote' ]; then
230230 service=" $db "
231231 proc_name=' '
232232 if [ " $service " = ' mysql' ]; then
233- if [ -d " /etc/sysconfig" ]; then
233+ mysql_version=$( mysql -V)
234+ mariadb_string=" MariaDB"
235+ if [[ ! $mysql_version =~ $mariadb_string ]]; then
236+ # MySQL
234237 service=' mysqld'
235238 proc_name=' mysqld'
236- fi
237- if [ -e " /lib/systemd/system/mariadb.service" ]; then
238- service=' mariadb'
239- proc_name=' mysqld'
240- fi
241- if [ -f /usr/bin/mysql ]; then
242- mariadb_v=` mysql -V | awk ' NR==1{print $5}' | head -c 4`
243- if [ $mariadb_v = " 10.5" ] || [ $mariadb_v = " 10.6" ]; then
239+ else
240+ # MariaDB
241+ if [ -e " /lib/systemd/system/mariadb.service" ]; then
244242 service=' mariadb'
245- proc_name=' mariadbd'
243+ proc_name=' mysqld'
244+ fi
245+ 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" ]; then
248+ service=' mariadb'
249+ proc_name=' mariadbd'
250+ fi
246251 fi
247252 fi
248253 fi
You can’t perform that action at this time.
0 commit comments