summaryrefslogtreecommitdiffstats
path: root/scripts/cron/radiusd.cron.daily.in
blob: da631ba79e98b5514af675a41d9d9b4cb3c1f41f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /bin/sh
#
# radiusd	Cron script to rotate radiusd log files daily.
#

prefix=@prefix@
localstatedir=@localstatedir@
logdir=@logdir@

umask 027
cd $logdir

# Take care of the standard logfiles.
cd $logdir
if [ -f radius.log ]
then
	savelog -g adm -m 640 -c 3 radius.log > /dev/null
fi

# Rotate "details" files.
if [ ! -d radacct/. ]
then
	exit 0
fi
cd radacct

for LOG in */detail
do
	if [ -f $LOG ]
	then
		savelog -g adm -m 640 -u root -c 3 $LOG >/dev/null
	fi
done