Advertisement
Guest User

Untitled

a guest
Mar 31st, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.11 KB | None | 0 0
  1. # daemon does not need restarting after log rotate
  2. # so we do not prod it any more
  3. /var/log/exim/*log {
  4.   compress
  5.   daily
  6.   missingok
  7.   notifempty
  8.   delaycompress
  9. }
  10. #
  11. # Gentoo:
  12. # http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-analyzer/fail2ban/files/fail2ban-logrotate?view=markup
  13. #
  14. # Debian:
  15. # https://github.com/fail2ban/fail2ban/blob/debian/debian/fail2ban.logrotate
  16.  
  17. /var/log/fail2ban.log {
  18.     missingok
  19.     notifempty
  20.     postrotate
  21.       /usr/bin/fail2ban-client flushlogs >/dev/null || true
  22.     endscript
  23. }
  24. /var/log/httpd/*log {
  25.     missingok
  26.     notifempty
  27.     sharedscripts
  28.     delaycompress
  29.     postrotate
  30.         /bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true
  31.     endscript
  32. }
  33. # This logname can be set in /etc/my.cnf
  34. # by setting the variable "log-error"
  35. # in the [mysqld_safe] section as follows:
  36. #
  37. # [mysqld_safe]
  38. # log-error=/var/log/mariadb/mariadb.log
  39. #
  40. # If the root user has a password you have to create a
  41. # /root/.my.cnf configuration file with the following
  42. # content:
  43. #
  44. # [mysqladmin]
  45. # password = <secret>
  46. # user= root
  47. #
  48. # where "<secret>" is the password.
  49. #
  50. # ATTENTION: This /root/.my.cnf should be readable ONLY
  51. # for root !
  52.  
  53. # Then, un-comment the following lines to enable rotation of mysql's log file:
  54.  
  55. /var/log/mariadb/mariadb.log {
  56.         create 640 mysql mysql
  57.         notifempty
  58.         daily
  59.         rotate 3
  60.         missingok
  61.         compress
  62.     postrotate
  63.         # just if mysqld is really running
  64.         if test -x /usr/bin/mysqladmin && \
  65.            /usr/bin/mysqladmin ping &>/dev/null
  66.         then
  67.            /usr/bin/mysqladmin flush-logs
  68.         fi
  69.     endscript
  70. }
  71. /var/named/data/named.run {
  72.     missingok
  73.     su named named
  74.     create 0644 named named
  75.     postrotate
  76.         /usr/bin/systemctl reload named.service > /dev/null 2>&1 || true
  77.         /usr/bin/systemctl reload named-chroot.service > /dev/null 2>&1 || true
  78.         /usr/bin/systemctl reload named-sdb.service > /dev/null 2>&1 || true
  79.         /usr/bin/systemctl reload named-sdb-chroot.service > /dev/null 2>&1 || true
  80.         /usr/bin/systemctl reload named-pkcs11.service > /dev/null 2>&1 || true
  81.     endscript
  82. }
  83. # Logrotate file for ppp RPM
  84.  
  85. /var/log/ppp/connect-errors {
  86.         missingok
  87.         compress
  88.         notifempty
  89.         daily
  90.         rotate 5
  91.         create 0600 root root
  92. }
  93. /var/log/proftpd/*.log /var/log/xferlog {
  94.     compress
  95.     missingok
  96.     notifempty
  97.     sharedscripts
  98.     postrotate
  99.         systemctl reload proftpd.service
  100.     endscript
  101. }
  102.  
  103. /var/log/roundcubemail/*.log {
  104.     missingok
  105.     su root apache
  106.     notifempty
  107.     size 30k
  108.     nocreate
  109. }
  110. /var/log/cron
  111. /var/log/maillog
  112. /var/log/messages
  113. /var/log/secure
  114. /var/log/spooler
  115. {
  116.     missingok
  117.     sharedscripts
  118.     postrotate
  119.         /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
  120.     endscript
  121. }
  122. /var/log/wpa_supplicant.log {
  123.     missingok
  124.     notifempty
  125.     size 30k
  126.     create 0600 root root
  127. }
  128. /var/log/yum.log {
  129.     missingok
  130.     notifempty
  131.     size 30k
  132.     yearly
  133.     create 0600 root root
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement