Merge pull request #516 from TheSerapher/logrotation-script

Adding sample logrotation config and cron
This commit is contained in:
Sebastian Grewe 2013-07-24 03:51:24 -07:00
commit 8552679920
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