Skip to content

Commit

Permalink
Use mysqladmin ping instead of pid files
Browse files Browse the repository at this point in the history
How 'bout know?
  • Loading branch information
odenbach authored and grooverdan committed Dec 3, 2021
1 parent 1b0fb2f commit 658a1e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions debian/mariadb-server-10.4.mysql-server.logrotate
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 658a1e1

Please sign in to comment.