Dialogic 1010 manual Configuring Free RADIUS using GCEMS as RADIUS Server

Models: 1010

1 27
Download 27 pages 40.81 Kb
Page 21
Image 21

Configuring Free RADIUS using GCEMS as RADIUS Server

10. Archive & delete CDR detail files.

A copy of the following files can be found at /opt/cantata/IMG/radius .

a. In the /var/log/radius/radacct folder create a script to archive files. Name the file “CDR”

#!/bin/sh

# CDR

# Sample script to archive CDR's.

# Files are archived if more than 1 days old

# Files are deleted if more than 31 days old

find /var/log/radius/radacct/*/detail* -mtime +1 -exec gzip {} \; find /var/log/radius/radacct/*/detail* -mtime +31 -exec rm -f {} \;

b. Create a cron task to run this script. This cron task can be run hourly or daily. The example below will run it hourly. After creating this script restart the cron service or restart the server.

In the /etc/cron.hourly folder create a file to run the script created in the previous step.

#!/bin/bash

crontab<<EOF

# cron.dat-cdr - cron file for CDR's

#

# This script restarts the CDR log files each hour.

0 * * * * /var/log/radius/radacct/CDR

#

EOF

To e-mail this topic, click here

Copyright © 2007 Dialogic Corporation All rights reserved.

23

Page 21
Image 21
Dialogic 1010 manual Configuring Free RADIUS using GCEMS as RADIUS Server, Archive & delete CDR detail files