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