MacPorts logrotate

MacPorts logrotate

$ sudo port install logrotate
Password:
—> Computing dependencies for logrotate
—> Fetching archive for logrotate
—> Attempting to fetch logrotate-3.8.6_2+gzip.darwin_13.x86_64.tbz2 from http ://jog.id.packages.macports.org/macports/packages/logrotate
—> Attempting to fetch logrotate-3.8.6_2+gzip.darwin_13.x86_64.tbz2 from http ://packages.macports.org/logrotate
—> Attempting to fetch logrotate-3.8.6_2+gzip.darwin_13.x86_64.tbz2.rmd160 fr om http://packages.macports.org/logrotate
—> Installing logrotate @3.8.6_2+gzip
—> Activating logrotate @3.8.6_2+gzip

To use logrotate:

* If /opt/local/etc/logrotate.conf does not exist copy the example into place.

$ sudo cp /opt/local/share/logrotate/logrotate.conf.example /opt/local/etc/logrotate.conf

* With the startupitem variant (+startupitem) you can activate a scheduled log
rotation with this command.

$ sudo port load logrotate

* To create your own startup item with non-default intervals, build logrotate
without the startupitem variant (-startupitem), copy the example into place
and edit to your liking, then load with launchctl when finished.

$ sudo cp /opt/local/share/logrotate/org.macports.logrotate.plist.example /Library/LaunchDaemons/org.macports.logrotate.plist

$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.logrotate.plist