Commit 2fbe625e authored by lenz@mysql.com's avatar lenz@mysql.com

- small improvement for the logrotate config file (patch found in the SUSE

  source RPM): use "mysqladmin ping" instead of grepping the process list 
  for the mysqld binary (should be more portable than relying on the "ps"
  options
parent 0e56df75
# This logname is set in mysql.server.sh that ends up in /etc/rc.d/init.d/mysql # This logname can be set in /etc/my.cnf
# by setting the variable "err-log"
# in the [safe_mysqld] section as follows:
#
# [safe_mysqld]
# err-log=@localstatedir@/mysqld.log
# #
# If the root user has a password you have to create a # If the root user has a password you have to create a
# /root/.my.cnf configuration file with the following # /root/.my.cnf configuration file with the following
...@@ -22,7 +27,9 @@ ...@@ -22,7 +27,9 @@
compress compress
postrotate postrotate
# just if mysqld is really running # just if mysqld is really running
if test -n "`ps acx|grep mysqld`"; then if test -x @bindir@/mysqladmin && \
@bindir@/mysqladmin ping &>/dev/null
then
@bindir@/mysqladmin flush-logs @bindir@/mysqladmin flush-logs
fi fi
endscript endscript
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment