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*
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
#
#
# This script restarts the CDR log files each hour.
0 * * * * /var/log/radius/radacct/CDR
#
EOF
To
Copyright © 2007 Dialogic Corporation All rights reserved.
23