比思論壇

標題: logrotate配置 [打印本頁]

作者: airarara    時間: 2015-9-9 16:59
標題: logrotate配置
/etc/logrotate.conf
/etc/logrotate.d/*

/var/log/squid/*.log {
    size=10M
    daily
    rotate 5
    compress
    notifempty
    missingok
    sharedscripts
    postrotate
      # Asks squid to reopen its logs. (log_rotate 0 is set in squid.conf)
      # errors redirected to make it silent if squid is not running
      /usr/sbin/squid -k rotate 2>/dev/null
      # Wait a little to allow Squid to catch up before the logs is compressed
      sleep 1
    endscript

daily  
dateext

}







歡迎光臨 比思論壇 (http://108.170.5.98:8080/) Powered by Discuz! X2.5