diff --git a/CHANGELOG.md b/CHANGELOG.md index 4228d173..43ddbf67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Changed * evocheck: upstream release 22.03 -* evolinux-base: backup-server-state release 22.03.2 +* evolinux-base: backup-server-state release 22.03.3 * evolinux-base: Add non-free repos & install non-free firmware on dedicated hardware * generate-ldif: Add services check for bkctld * minifirewall: upstream release 22.03.2 and use includes directory diff --git a/evolinux-base/files/backup-server-state.sh b/evolinux-base/files/backup-server-state.sh index 588ff6e5..9bf16a59 100644 --- a/evolinux-base/files/backup-server-state.sh +++ b/evolinux-base/files/backup-server-state.sh @@ -2,7 +2,7 @@ PROGNAME="backup-server-state" -VERSION="22.03.2" +VERSION="22.03.3" readonly VERSION backup_dir= @@ -667,15 +667,20 @@ backup_mysql_processes() { mysqladmin_bin=$(command -v mysqladmin) if [ -n "${mysqladmin_bin}" ]; then - last_result=$(${mysqladmin_bin} --verbose processlist > "${backup_dir}/mysql-processlist.txt") - last_rc=$? + # Look for local MySQL or MariaDB process + if pgrep mysqld > /dev/null || pgrep mariadbd > /dev/null; then + last_result=$(${mysqladmin_bin} --verbose processlist > "${backup_dir}/mysql-processlist.txt") + last_rc=$? - if [ ${last_rc} -eq 0 ]; then - debug "* mysqladmin OK" + if [ ${last_rc} -eq 0 ]; then + debug "* mysqladmin OK" + else + debug "* mysqladmin ERROR" + debug "${last_result}" + rc=10 + fi else - debug "* mysqladmin ERROR" - debug "${last_result}" - rc=10 + debug "* no mysqld or mariadbd process is running" fi else debug "* mysqladmin not found"