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