LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File freeradius-server-radiusd-logrotate.patch of Package freeradius-current (Project home:MrNakata)

Index: freeradius-server-3.0.14/suse/radiusd-logrotate
===================================================================
--- freeradius-server-3.0.14.orig/suse/radiusd-logrotate
+++ freeradius-server-3.0.14/suse/radiusd-logrotate
@@ -16,13 +16,18 @@ notifempty
 #  The main server log
 #
 /var/log/radius/radius.log {
+	su radiusd radiusd
 	copytruncate
+	postrotate
+			kill -HUP `cat /run/radiusd/radiusd.pid` || :
+	endscript
 }
 
 #
 #  Session monitoring utilities
 #
 /var/log/radius/checkrad.log /var/log/radius/radwatch.log {
+	su radiusd radiusd
 	nocreate
 	size=+1024k
 }
@@ -31,6 +36,7 @@ notifempty
 #  SQL log files
 #
 /var/log/radius/sqllog.sql {
+	su radiusd radiusd
 	nocreate
 	size=+2048k
 }
@@ -43,6 +49,7 @@ notifempty
 # 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 {
+	su radiusd radiusd
 	nocreate
 }