diff options
author | unknown <lenz@mysql.com> | 2005-01-18 17:35:32 +0100 |
---|---|---|
committer | unknown <lenz@mysql.com> | 2005-01-18 17:35:32 +0100 |
commit | c148946d03c17a996f6819af3e713af14ad17f23 (patch) | |
tree | e2420de86ce2c609d580f2cbdea22eed35eb43d5 /support-files/mysql-log-rotate.sh | |
parent | e46d235a08a35bdd5536b4b2b99ed3a5b6910cdf (diff) | |
download | mariadb-git-c148946d03c17a996f6819af3e713af14ad17f23.tar.gz |
- 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
support-files/mysql-log-rotate.sh:
- small improvement (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
Diffstat (limited to 'support-files/mysql-log-rotate.sh')
-rw-r--r-- | support-files/mysql-log-rotate.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/support-files/mysql-log-rotate.sh b/support-files/mysql-log-rotate.sh index a1153c66f40..0ee78b0f7ca 100644 --- a/support-files/mysql-log-rotate.sh +++ b/support-files/mysql-log-rotate.sh @@ -1,4 +1,9 @@ -# 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 # /root/.my.cnf configuration file with the following @@ -22,8 +27,10 @@ compress postrotate # just if mysqld is really running - if test -n "`ps acx|grep mysqld`"; then - @bindir@/mysqladmin flush-logs + if test -x @bindir@/mysqladmin && \ + @bindir@/mysqladmin ping &>/dev/null + then + @bindir@/mysqladmin flush-logs fi endscript } |