The same bug as in https://bugs.gentoo.org/685822 also applies to /etc/logrotate.d/mysql. Since we overwrite pid-file = /var/run/mysqld/mariadb.pid, the postrotate part of logrotate will fail with: cat: /var/run/mysqld/mariadb.pid: No such file or directory Solution would be to add "| tail -n1" to postrotate: /bin/kill -HUP $(cat $(my_print_defaults server mysqld mariadb | grep 'pid[_-]file' | cut -d = -f 2 | tail -n1)) Another suggestion would be to move the whole SIGHUP part to /etc/init.d/mysql and just call "/etc/init.d/mysql rotate" within the postrotate.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cda4995e825424bf017dc4a76e249d0531f841d4 commit cda4995e825424bf017dc4a76e249d0531f841d4 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-08-28 14:17:49 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-08-28 14:43:21 +0000 dev-db/mysql-init-scripts: rev bump - Move acct-* dependencies to RDEPEND to support binary packages. Note: According to devmanual there will be a problem once emerge will merge RDEPEND after the actual package. - Handle the case when option is defined multiple times. Closes: https://bugs.gentoo.org/693000 Closes: https://bugs.gentoo.org/686378 Package-Manager: Portage-2.3.72, Repoman-2.3.17 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> .../mysql-init-scripts/files/logrotate.mysql-2.3 | 5 +- .../mysql-init-scripts-2.3-r3.ebuild | 70 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-)