logrotate: don’t accidentally define global options (Closes: #872158)
Michael Stapelberg
6 years ago
0 | # You can use this to rotate the /var/log/freeradius/* files, simply copy | |
1 | # it to /etc/logrotate.d/radiusd | |
0 | # The main server log | |
1 | /var/log/freeradius/radius.log { | |
2 | # common options | |
3 | daily | |
4 | rotate 52 | |
5 | missingok | |
6 | compress | |
7 | delaycompress | |
8 | notifempty | |
2 | 9 | |
3 | # | |
4 | # Global options for all logfiles | |
5 | # | |
6 | daily | |
7 | rotate 52 | |
8 | missingok | |
9 | compress | |
10 | delaycompress | |
11 | notifempty | |
12 | ||
13 | # | |
14 | # The main server log | |
15 | # | |
16 | /var/log/freeradius/radius.log { | |
17 | 10 | copytruncate |
18 | 11 | } |
19 | 12 | |
20 | # | |
13 | # (in order) | |
21 | 14 | # Session monitoring utilities |
22 | # | |
23 | /var/log/freeradius/checkrad.log /var/log/freeradius/radwatch.log { | |
24 | nocreate | |
25 | } | |
15 | # Session database modules | |
16 | # SQL log files | |
17 | /var/log/freeradius/checkrad.log /var/log/freeradius/radwatch.log | |
18 | /var/log/freeradius/radutmp /var/log/freeradius/radwtmp | |
19 | /var/log/freeradius/sqllog.sql | |
20 | { | |
21 | # common options | |
22 | daily | |
23 | rotate 52 | |
24 | missingok | |
25 | compress | |
26 | delaycompress | |
27 | notifempty | |
26 | 28 | |
27 | # | |
28 | # Session database modules | |
29 | # | |
30 | /var/log/freeradius/radutmp /var/log/freeradius/radwtmp { | |
31 | nocreate | |
32 | } | |
33 | ||
34 | # | |
35 | # SQL log files | |
36 | # | |
37 | /var/log/freeradius/sqllog.sql { | |
38 | 29 | nocreate |
39 | 30 | } |
40 | 31 | |
46 | 37 | # second technique, you will need another cron job that removes old |
47 | 38 | # detail files. You do not need to comment out the below for method #2. |
48 | 39 | /var/log/freeradius/radacct/*/detail { |
40 | # common options | |
41 | daily | |
42 | rotate 52 | |
43 | missingok | |
44 | compress | |
45 | delaycompress | |
46 | notifempty | |
47 | ||
49 | 48 | nocreate |
50 | 49 | } |