Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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
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
/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
You can’t perform that action at this time.