debian: Fixing logrotate script
authorJorge Pereira <jpereiran@gmail.com>
Thu, 17 Sep 2015 14:27:21 +0000 (11:27 -0300)
committerJorge Pereira <jpereiran@gmail.com>
Thu, 17 Sep 2015 14:27:21 +0000 (11:27 -0300)
debian/patches/logrotate-path.diff [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/logrotate-path.diff b/debian/patches/logrotate-path.diff
new file mode 100644 (file)
index 0000000..cce0e85
--- /dev/null
@@ -0,0 +1,56 @@
+diff a/scripts/logrotate/freeradius b/scripts/logrotate/freeradius
+--- a/scripts/logrotate/freeradius
++++ b/scripts/logrotate/freeradius
+@@ -1,7 +1,7 @@
+ #
+ #  Sample logrotate file for FreeRADIUS
+ #
+-#  You can use this to rotate the /var/log/radius/* files, simply copy it to /etc/logrotate.d/radiusd
++#  You can use this to rotate the /var/log/freeradius/* files, simply copy it to /etc/logrotate.d/radiusd
+ #
+ #
+@@ -17,30 +17,30 @@ notifempty
+ #
+ #  The main server log
+ #
+-/var/log/radius/radius.log {
++/var/log/freeradius/radius.log {
+       postrotate
+-      /sbin/killall -HUP radiusd
++      /etc/init.d/freeradius reload
+       endscript
+ }
+ #
+ #  Session monitoring utilities
+ #
+-/var/log/radius/checkrad.log /var/log/radius/radwatch.log {
++/var/log/freeradius/checkrad.log /var/log/freeradius/radwatch.log {
+       nocreate
+ }
+ #
+ #  Session database modules
+ #
+-/var/log/radius/radutmp /var/log/radius/radwtmp {
++/var/log/freeradius/radutmp /var/log/freeradius/radwtmp {
+       nocreate
+ }
+ #
+ #  SQL log files
+ #
+-/var/log/radius/sqllog.sql {
++/var/log/freeradius/sqllog.sql {
+       nocreate
+ }
+@@ -51,6 +51,6 @@ notifempty
+ # (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 {
++/var/log/freeradius/radacct/*/detail {
+       nocreate
+ }
index 893d2d1..886c023 100644 (file)
@@ -1,2 +1,3 @@
 radiusd-to-freeradius.diff
 disable-dhcp-bydefault.diff
+logrotate-path.diff