d3a4de
# You can use this to rotate the /var/log/radius/* files, simply copy
d3a4de
# it to /etc/logrotate.d/radiusd
d3a4de
d3a4de
# There are different detail-rotating strategies you can use.  One is
d3a4de
# to write to a single detail file per IP and use the rotate config
d3a4de
# below.  Another is to write to a daily detail file per IP with:
d3a4de
#     detailfile = ${radacctdir}/%{Client-IP-Address}/%Y%m%d-detail
d3a4de
# (or similar) in radiusd.conf, without rotation.  If you go with the
d3a4de
# second technique, you will need another cron job that removes old
d3a4de
# detail files.  You do not need to comment out the below for method #2.
d3a4de
/var/log/radius/radacct/*/detail {
d3a4de
	monthly
d3a4de
	rotate 4
d3a4de
	nocreate
d3a4de
	missingok
d3a4de
	compress
d3a4de
	su radiusd radiusd
d3a4de
}
d3a4de
d3a4de
/var/log/radius/checkrad.log {
d3a4de
	monthly
d3a4de
	rotate 4
d3a4de
	create
d3a4de
	missingok
d3a4de
	compress
d3a4de
	su radiusd radiusd
d3a4de
}
d3a4de
d3a4de
/var/log/radius/radius.log {
d3a4de
	monthly
d3a4de
	rotate 4
d3a4de
	create
d3a4de
	missingok
d3a4de
	compress
d3a4de
	su radiusd radiusd
d3a4de
	postrotate
d3a4de
		/usr/bin/systemctl reload-or-try-restart radiusd
d3a4de
	endscript
d3a4de
}
d3a4de
d3a4de
/var/log/radius/radwtmp {
d3a4de
	monthly
d3a4de
	rotate 4
d3a4de
	create
d3a4de
	compress
d3a4de
	missingok
d3a4de
	su radiusd radiusd
d3a4de
}
d3a4de
/var/log/radius/sqltrace.sql {
d3a4de
        monthly
d3a4de
        rotate 4
d3a4de
        create
d3a4de
        compress
d3a4de
        missingok
d3a4de
	su radiusd radiusd
d3a4de
}