| 1 |
# Log Rotation for BOINC Daemon Logs
|
| 2 |
#
|
| 3 |
# See http://boinc.berkeley.edu/ for more information about BOINC
|
| 4 |
#
|
| 5 |
# Daemon is stopped and then restarted after the logs are rotated.
|
| 6 |
#
|
| 7 |
# On restart, all results that checkpoint will fall back to the last one, if it exists.
|
| 8 |
# On restart, all results that did not checkpoint will start from the beginning.
|
| 9 |
|
| 10 |
# Author: Kathryn Marks <kathryn.boinc@gmail.com>
|
| 11 |
# Created: October 6, 2007
|
| 12 |
# Last Modified: October 15, 2007
|
| 13 |
######################################################################
|
| 14 |
|
| 15 |
# Global Parameters
|
| 16 |
|
| 17 |
missingok
|
| 18 |
compress
|
| 19 |
delaycompress
|
| 20 |
notifempty
|
| 21 |
nomail
|
| 22 |
|
| 23 |
# Log Specific Parameters
|
| 24 |
|
| 25 |
# boinc.log
|
| 26 |
|
| 27 |
# Normal usage:
|
| 28 |
# Rotate weekly and keep about 2 months worth
|
| 29 |
|
| 30 |
/var/log/boinc.log
|
| 31 |
{
|
| 32 |
weekly
|
| 33 |
rotate 8
|
| 34 |
create 664 boinc boinc
|
| 35 |
sharedscripts
|
| 36 |
prerotate
|
| 37 |
if [ -f /var/lock/subsys/boinc ]; then
|
| 38 |
touch /var/run/boinc_was_running
|
| 39 |
/etc/init.d/boinc stop
|
| 40 |
fi
|
| 41 |
endscript
|
| 42 |
postrotate
|
| 43 |
if [ -f /var/run/boinc_was_running ]; then
|
| 44 |
rm /var/run/boinc_was_running
|
| 45 |
/etc/init.d/boinc start
|
| 46 |
fi
|
| 47 |
endscript
|
| 48 |
}
|
| 49 |
|
| 50 |
|
| 51 |
# boincerr.log
|
| 52 |
|
| 53 |
# Normal usage:
|
| 54 |
# Rotate monthly and keep about 2 months worth
|
| 55 |
|
| 56 |
/var/log/boincerr.log
|
| 57 |
{
|
| 58 |
monthly
|
| 59 |
rotate 2
|
| 60 |
create 664 boinc boinc
|
| 61 |
sharedscripts
|
| 62 |
prerotate
|
| 63 |
if [ -f /var/lock/subsys/boinc ]; then
|
| 64 |
touch /var/run/boinc_was_running
|
| 65 |
/etc/init.d/boinc stop
|
| 66 |
fi
|
| 67 |
endscript
|
| 68 |
postrotate
|
| 69 |
if [ -f /var/run/boinc_was_running ]; then
|
| 70 |
rm /var/run/boinc_was_running
|
| 71 |
/etc/init.d/boinc start
|
| 72 |
fi
|
| 73 |
endscript
|
| 74 |
}
|
| 75 |
|
| 76 |
## EOF ##
|
| 77 |
|