&tag(logrotate);
logrotate /opt/local/etc/logrotate.conf
| -f | 強制実行 | 必要ない場合でもローテーションを強制実行。 |
| -d | デバッグ | デバッグモードをオンに設定。 |
/opt/local/var/log/apache2/*log {
daily
rotate 7
missingok
notifempty
sharedscripts
nocompress
delaycompress
postrotate
/opt/local/sbin/apachectl restart > /dev/null 2>/dev/null || true
endscript
}