--- mysql-server.10.3.8	2018-07-18 11:45:25.993895358 +0200
+++ mysql-server.10.3.x	2018-07-18 11:45:55.061895358 +0200
@@ -11,7 +11,7 @@
 	sharedscripts
 	postrotate
           test -x /usr/bin/mysqladmin || exit 0
-          if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
+          if [ -f `my_print_defaults --mysqld | grep -oP -m 1 "pid-file=\K[^$]+"` ]; then
             # If this fails, check debian.conf!
             mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
               flush-engine-log flush-general-log flush-slow-log
