File: radiusd.cron.daily

package info (click to toggle)
xtradius 1.2.1-beta2-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,256 kB
  • ctags: 921
  • sloc: ansic: 10,183; perl: 733; sh: 267; makefile: 148; sql: 21
file content (37 lines) | stat: -rw-r--r-- 592 bytes parent folder | download | duplicates (3)
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 */detail
do
	if [ -f $LOG ]
	then
		savelog -g adm -m 640 -u root -c 3 $LOG >/dev/null
	fi
done