Adding sample logrotation config and cron

This will allow pool operators to rotate the logfiles automatically via cron.
This commit is contained in:
Sebastian Grewe 2013-07-24 11:13:28 +02:00
parent 6a04666ec3
commit 9ff455d0dd
3 changed files with 18 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
/public/include/config/global.inc.php
/public/templates/compile/*.php
/cronjobs/logs/*.txt
/cronjobs/logs/*.txt.*.gz
/public/templates/cache/*.php

View File

@ -0,0 +1,6 @@
"./logs/*.txt" {
copytruncate
rotate 7
compress
daily
}

11
cronjobs/logrotate.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# Find scripts path
if [[ -L $0 ]]; then
CRONHOME=$( dirname $( readlink $0 ) )
else
CRONHOME=$( dirname $0 )
fi
cd $CRONHOME
logrotate etc/logrotate.conf