File: radiusd.cron.daily

package info (click to toggle)
xtradius 1.1-pre2-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 880 kB
  • ctags: 803
  • sloc: ansic: 8,719; perl: 651; sh: 219; makefile: 116; sql: 21
file content (37 lines) | stat: -rwxr-xr-x 585 bytes parent folder | download
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
35
36
37
#! /bin/sh
#
# radiusd	Cron script to rotate radiusd log files daily.
#		Debian/Linux: place this in /etc/cron.daily.
#

umask 027
cd /var/log

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

if [ -f radwatch.log ]
then
	savelog -g adm -m 640 -c 3 radwatch.log > /dev/null
	/etc/init.d/radiusd restart > /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