# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

/var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err {
monthly
create 660 mysql mysql
notifempty
size 5M
sharedscripts
missingok
postrotate
	pidfile=$(my_print_defaults server mysqld mariadb | grep 'pid[_-]file' | tail -n 1 | cut -d = -f 2)
	if [ -s "${pidfile}" ] ; then
		/bin/kill -HUP $(cat "${pidfile}")
	fi
endscript
}