Initial revision
[freeradius.git] / scripts / radiusd.cron.daily
1 #! /bin/sh
2 #
3 # radiusd       Cron script to rotate radiusd log files daily.
4 #               Debian/Linux: place this in /etc/cron.daily.
5 #
6
7 umask 027
8 cd /var/log
9
10 # Take care of the standard logfiles.
11 cd /var/log
12 if [ -f radius.log ]
13 then
14         savelog -g adm -m 640 -c 3 radius.log > /dev/null
15 fi
16
17 # Rotate "details" files.
18 if [ ! -d radacct/. ]
19 then
20         exit 0
21 fi
22 cd radacct
23
24 for LOG in */detail
25 do
26         if [ -f $LOG ]
27         then
28                 savelog -g adm -m 640 -u root -c 3 $LOG >/dev/null
29         fi
30 done
31