zqhong / pelican-blog

Use Pelican generate static blog site
1 stars 0 forks source link

logrotate - 切分、压缩日志工具 #10

Open zqhong opened 7 years ago

zqhong commented 7 years ago

Simple

/var/log/privoxy/logfile {
   missingok
   create 660 root privoxy
   notifempty
   compress
   postrotate
     /bin/kill -HUP `cat /var/run/privoxy.pid 2>/dev/null` 2> /dev/null || true
   endscript
}
[a

参考

被遗忘的Logrotate Linux日志文件总管——logrotate logrotate(8) - Linux man page