Skip to content

Commit 1b0fb2f

Browse files
odenbachgrooverdan
authored andcommitted
Fix logrotate problem with twice configured pid-file option
Hi, if the pid-file option is configured more than once (e.g. multiple times in different files), my_print_defaults prints it twice, resulting in the logrotate postrotate script failing because of a syntax error. Debian fixed this already (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830976#42). Perhaps you could implement this small change in the other branches as well? Thanks, Christopher
1 parent d7b37de commit 1b0fb2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

debian/mariadb-server-10.4.mysql-server.logrotate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
sharedscripts
1212
postrotate
1313
test -x /usr/bin/mysqladmin || exit 0
14-
if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
14+
if [ -f `my_print_defaults --mysqld | grep -m 1 -oP "pid-file=\K.+$"` ]; then
1515
# If this fails, check debian.conf!
1616
mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
1717
flush-engine-log flush-general-log flush-slow-log

0 commit comments

Comments
 (0)