Hi!

I was looking at monitoring the users.txt file with the script listed
in the FAQ, but that didn't seem to work too well with however i was
doing it. But that's OK. I installed sgi's FAM, and I have this small
perl script running in the background:

#!/usr/bin/perl -w
use SGI::FAM;
use Proc::Killall;
my $fam=new SGI::FAM;
$fam->monitor('/home/radiusd/users.txt');
while (1)
{
    my $event=$fam->next_event;
    killall("HUP", "radiusd") if($event->type eq "create");
}


I use the create event because our billing system has to FTP up the
users file, which causes it to be deleted and then recreated. You
might want to use the change event, or both. You could also extend
this to cover other configuration files - fam provides
$event->pathname, even, so you could take different actions based on
files.

mtp

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to