Initial commit
This commit is contained in:
20
etc/logrotate.d/mysql-server
Normal file
20
etc/logrotate.d/mysql-server
Normal file
@ -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 2
|
||||
missingok
|
||||
create 640 mysql adm
|
||||
compress
|
||||
sharedscripts
|
||||
postrotate
|
||||
test -x /usr/bin/mysqladmin || exit 0
|
||||
if [ -f `my_print_defaults --mysqld | grep -m 1 -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
|
||||
}
|
18
etc/logrotate.d/nginx
Normal file
18
etc/logrotate.d/nginx
Normal file
@ -0,0 +1,18 @@
|
||||
/var/log/nginx/*.log {
|
||||
daily
|
||||
missingok
|
||||
rotate 1
|
||||
nocompress
|
||||
delaycompress
|
||||
notifempty
|
||||
create 0640 www-data www-data
|
||||
sharedscripts
|
||||
prerotate
|
||||
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
|
||||
run-parts /etc/logrotate.d/httpd-prerotate; \
|
||||
fi \
|
||||
endscript
|
||||
postrotate
|
||||
invoke-rc.d nginx rotate >/dev/null 2>&1
|
||||
endscript
|
||||
}
|
11
etc/logrotate.d/php7.0-fpm
Normal file
11
etc/logrotate.d/php7.0-fpm
Normal file
@ -0,0 +1,11 @@
|
||||
/var/log/php7.0-fpm*.log {
|
||||
rotate 1
|
||||
daily
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
postrotate
|
||||
/usr/lib/php/php7.0-fpm-reopenlogs
|
||||
endscript
|
||||
}
|
11
etc/logrotate.d/php7.1-fpm
Normal file
11
etc/logrotate.d/php7.1-fpm
Normal file
@ -0,0 +1,11 @@
|
||||
/var/log/php7.1-fpm*.log {
|
||||
rotate 1
|
||||
daily
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
postrotate
|
||||
/usr/lib/php/php7.1-fpm-reopenlogs
|
||||
endscript
|
||||
}
|
15
etc/logrotate.d/tor
Normal file
15
etc/logrotate.d/tor
Normal file
@ -0,0 +1,15 @@
|
||||
/var/log/tor/*log {
|
||||
daily
|
||||
rotate 2
|
||||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
create 0640 debian-tor adm
|
||||
sharedscripts
|
||||
postrotate
|
||||
if service tor status > /dev/null; then
|
||||
service tor reload > /dev/null
|
||||
fi
|
||||
endscript
|
||||
}
|
10
etc/logrotate.d/vsftpd
Normal file
10
etc/logrotate.d/vsftpd
Normal file
@ -0,0 +1,10 @@
|
||||
/var/log/vsftpd.log
|
||||
{
|
||||
create 640 root adm
|
||||
|
||||
# ftpd doesn't handle SIGHUP properly
|
||||
missingok
|
||||
notifempty
|
||||
rotate 1
|
||||
daily
|
||||
}
|
Reference in New Issue
Block a user