Re: Rotating Radius Logfiles

Steven P. Crain (scrain@shore.net)
Fri, 6 Jun 1997 17:25:03 -0400 (EDT)

On Fri, 23 May 1997, Gene Imes wrote:

> Try this in a cron job Sunday night at 0005:
Make sure your cron daemon doesn't miss this at spring time change.

> #! /bin/sh
> #
> # Stop RADIUS and copy detail files to detail.<todays date>
> # and restart RADIUS then delete any files older than 8 weeks.
> #
> # Stop RADIUS
> PID=`/bin/ps -aux | grep radiusd | awk '{print $2}'`
>
> if [ ! -z "$PID" ] ; then
> /bin/kill ${PID} 1> /dev/null 2>&1
> fi

There is no need to kill the daemon. Read the code and you will see that
it closes and opens the file for each packet (kind of nasty, actually, but
it makes rotating easy). (PS: If you dpn't kill it don't restart it
either.)

----------------------------------------------------------------------------
Steven P. Crain scrain@shore.net http://www.shore.net/~scrain
Shore.Net Unix Development and Administration
An ISP with Excellence in the Greater Boston Area.