summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/mariadb-server-10.4.mysql-server.logrotate4
1 files changed, 2 insertions, 2 deletions
diff --git a/debian/mariadb-server-10.4.mysql-server.logrotate b/debian/mariadb-server-10.4.mysql-server.logrotate
index 34ef6385e8e..11e4480c427 100644
--- a/debian/mariadb-server-10.4.mysql-server.logrotate
+++ b/debian/mariadb-server-10.4.mysql-server.logrotate
@@ -11,8 +11,8 @@
sharedscripts
postrotate
test -x /usr/bin/mysqladmin || exit 0
- if [ -f `my_print_defaults --mysqld | grep -m 1 -oP "pid-file=\K.+$"` ]; then
- # If this fails, check debian.conf!
+ # check if server is running
+ if mysqladmin ping > /dev/null 2>&1; then
mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
flush-engine-log flush-general-log flush-slow-log
fi