Improve MySQL utils configuration checks
Debian 11 and MariaDB 10.5 might not have a /root/.my.cnf The mytop user can be something else than debian-sys-maint
This commit is contained in:
parent
92ef1bff32
commit
0586eefc46
|
@ -7,6 +7,7 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
|
||||||
|
|
||||||
* Check for bullseye security repository
|
* Check for bullseye security repository
|
||||||
* Checks for new minifirewall configuration
|
* Checks for new minifirewall configuration
|
||||||
|
* Improve MySQL utils configuration checks
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
13
evocheck.sh
13
evocheck.sh
|
@ -423,17 +423,20 @@ check_apachemunin() {
|
||||||
check_mysqlutils() {
|
check_mysqlutils() {
|
||||||
MYSQL_ADMIN=${MYSQL_ADMIN:-mysqladmin}
|
MYSQL_ADMIN=${MYSQL_ADMIN:-mysqladmin}
|
||||||
if is_installed mysql-server; then
|
if is_installed mysql-server; then
|
||||||
# You can configure MYSQL_ADMIN in evocheck.cf
|
# With Debian 11 and later, root can connect to MariaDB with the socket
|
||||||
if ! grep -qs "$MYSQL_ADMIN" /root/.my.cnf; then
|
if is_debian_wheezy || is_debian_jessie || is_debian_stretch || is_debian_buster; then
|
||||||
failed "IS_MYSQLUTILS" "mysqladmin missing in /root/.my.cnf"
|
# You can configure MYSQL_ADMIN in evocheck.cf
|
||||||
|
if ! grep -qs "^user *= *${MYSQL_ADMIN}" /root/.my.cnf; then
|
||||||
|
failed "IS_MYSQLUTILS" "${MYSQL_ADMIN} missing in /root/.my.cnf"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if ! test -x /usr/bin/mytop; then
|
if ! test -x /usr/bin/mytop; then
|
||||||
if ! test -x /usr/local/bin/mytop; then
|
if ! test -x /usr/local/bin/mytop; then
|
||||||
failed "IS_MYSQLUTILS" "mytop binary missing"
|
failed "IS_MYSQLUTILS" "mytop binary missing"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if ! grep -qs debian-sys-maint /root/.mytop; then
|
if ! grep -qs '^user *=' /root/.mytop; then
|
||||||
failed "IS_MYSQLUTILS" "debian-sys-maint missing in /root/.mytop"
|
failed "IS_MYSQLUTILS" "credentials missing in /root/.mytop"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue