summaryrefslogtreecommitdiff
path: root/debian/mariadb-server-10.6.mysql-server.logrotate
diff options
context:
space:
mode:
authorOtto Kekäläinen <otto@kekalainen.net>2020-05-14 18:00:13 +0300
committerOtto Kekäläinen <otto@kekalainen.net>2020-05-14 19:43:26 +0300
commit4501c7e875f457d4de7f94b97471ecdb1b99b21a (patch)
tree7b629038c19fd9ee74916a452c35c3229e502e75 /debian/mariadb-server-10.6.mysql-server.logrotate
parent20fa2509597fd1279dd6246a7863394a2a95d268 (diff)
downloadmariadb-git-4501c7e875f457d4de7f94b97471ecdb1b99b21a.tar.gz
Deb: Rename relevant occurrences of 10.5 to 10.6 now in 10.6 series
Diffstat (limited to 'debian/mariadb-server-10.6.mysql-server.logrotate')
-rw-r--r--debian/mariadb-server-10.6.mysql-server.logrotate20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/mariadb-server-10.6.mysql-server.logrotate b/debian/mariadb-server-10.6.mysql-server.logrotate
new file mode 100644
index 00000000000..4111a276dc3
--- /dev/null
+++ b/debian/mariadb-server-10.6.mysql-server.logrotate
@@ -0,0 +1,20 @@
+# - I put everything in one block and added sharedscripts, so that mysql gets
+# flush-logs'd only once.
+# Else the binary logs would automatically increase by n times every day.
+# - The error log is obsolete, messages go to syslog now.
+/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log {
+ daily
+ rotate 7
+ missingok
+ create 640 mysql adm
+ compress
+ sharedscripts
+ postrotate
+ test -x /usr/bin/mysqladmin || exit 0
+ if [ -f `my_print_defaults --mysqld | grep -oP "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
+ fi
+ endscript
+}