how to run sql query on radius startup

Sergey Pariev spariev at tnet.dp.ua
Tue Aug 30 20:55:45 CEST 2005


Hello.

I'm implementing my own db-based auth setup, and I want to check stale 
sessions, which can be caused by power outage, improper NAS shutdown, 
etc, on radius server startup. Basically I'd just like to have some sql 
query hook which would be executed on startup - to check the DB state . 
I've looked over config files for different sql modules but haven't 
found anything similar.

So I'd like to clarify if such a query hook exists at all, and if not, 
how it can be done.

Also I would appreciate any freeradius-related suggestions or best 
practices for dealing with things like stale sessions, handling improper 
shutdown etc - I suppose it's a common and known problem and there is 
currently no time to reinvent the wheel :) . Any pointers or advices 
would be highly appreciated.

Thanks, Sergey.


Thor Spruyt пишет:
> Sergey Pariev wrote:
> 
>>Hi All.
>>I'm currently setting up freeeradius 1.0.4 with pgsql (8.0.3) backend,
>>and I need to run an SQL query on radius server startup. Id like to
>>know 
>>is it possible at all ? I've read the docs and *.sql config files but
>>haven't found anything like this. Any suggestions ?
>>I know I can run a query via psql from radius startup script, but I'd
>>prefer another solution if such exists.
> 
> 
> What exactly would you want to do?
> Maybe it serves a general purpose :)
> 



More information about the Freeradius-Users mailing list