Created
May 21, 2010 19:10
-
-
Save jgeiger/409285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a new cron job at panel.dreamhost.com and run it daily (which will be midnight) | |
/home/account/opt/bin/logrotate -f -s /home/account/opt/lib/logrotate.status /home/account/opt/etc/logrotate.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
mkdir -p opt/bin | |
mkdir -p opt/lib | |
mkdir -p opt/etc | |
mkdir src | |
cd src | |
wget http://www.sfr-fresh.com/unix/privat/logrotate-3.7.8.tar.gz | |
tar xfvz logrotate-3.7.8.tar.gz | |
cd logrotate-3.7.8 | |
make | |
cp logrotate ~/opt/bin/ | |
cd ~/opt/etc | |
vi logrotate.conf | |
# paste in the file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/account/website/shared/log/*.log { | |
daily | |
missingok | |
rotate 7 | |
compress | |
delaycompress | |
notifempty | |
copytruncate | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment