summaryrefslogtreecommitdiff
path: root/freeradius-logrotate
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-01 14:06:58 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-01 14:06:58 +0000
commitfa0594f4021dbf53966e167cf44c1bb84df5bb23 (patch)
tree3c991fcabf18a0e314a10edf337db266e504af11 /freeradius-logrotate
parent72d830c7e64b038eb96c0f36e0c1a0ab225238e3 (diff)
automatic import of freeradiusopeneuler24.03_LTS
Diffstat (limited to 'freeradius-logrotate')
-rw-r--r--freeradius-logrotate56
1 files changed, 56 insertions, 0 deletions
diff --git a/freeradius-logrotate b/freeradius-logrotate
new file mode 100644
index 0000000..c962254
--- /dev/null
+++ b/freeradius-logrotate
@@ -0,0 +1,56 @@
+# You can use this to rotate the /var/log/radius/* files, simply copy
+# it to /etc/logrotate.d/radiusd
+
+# There are different detail-rotating strategies you can use. One is
+# to write to a single detail file per IP and use the rotate config
+# below. Another is to write to a daily detail file per IP with:
+# detailfile = ${radacctdir}/%{Client-IP-Address}/%Y%m%d-detail
+# (or similar) in radiusd.conf, without rotation. If you go with the
+# second technique, you will need another cron job that removes old
+# detail files. You do not need to comment out the below for method #2.
+/var/log/radius/radacct/*/detail {
+ monthly
+ rotate 4
+ nocreate
+ missingok
+ compress
+ su radiusd radiusd
+}
+
+/var/log/radius/checkrad.log {
+ monthly
+ rotate 4
+ create
+ missingok
+ compress
+ su radiusd radiusd
+}
+
+/var/log/radius/radius.log {
+ monthly
+ rotate 4
+ create
+ missingok
+ compress
+ su radiusd radiusd
+ postrotate
+ /usr/bin/systemctl reload-or-try-restart radiusd
+ endscript
+}
+
+/var/log/radius/radwtmp {
+ monthly
+ rotate 4
+ create
+ compress
+ missingok
+ su radiusd radiusd
+}
+/var/log/radius/sqltrace.sql {
+ monthly
+ rotate 4
+ create
+ compress
+ missingok
+ su radiusd radiusd
+}