Adding a NAS via SQL

Peter Nixon listuser at peternixon.net
Tue Jul 31 11:49:36 CEST 2007


Then pipe the susdo command though ssh...

-Peter

On Tue 31 Jul 2007, Santiago Balaguer García wrote:
> I have one question to this, you suposed that RADIUS and DataBase services
> are in the same machine, what happens if these services are in severa or
> there are replicate servers?
>
> >My advice is to create a database trigger on INSERTs, UPDATEs,
> >DELETEs.
> >For example, my postgresql trigger written in plperlu:
> >
> >CREATE OR REPLACE FUNCTION restart_radiusd() RETURNS TRIGGER AS $rr_rad$
> >         system("/usr/bin/sudo /usr/bin/killall -HUP radiusd");
> >         return;
> >$rr_rad$ LANGUAGE plperlu;
> >DROP TRIGGER IF EXISTS need_to_restart_radiusd ON nas_table;
> >CREATE TRIGGER need_to_restart_radiusd AFTER INSERT OR UPDATE OR DELETE
> > ON nas_table FOR EACH STATEMENT EXECUTE PROCEDURE restart_radiusd();
> >
> >/etc/sudoers:
> >postgresqluser      ALL=(radiususer) NOPASSWD: /usr/bin/killall -HUP
> > radiusd
> >
> >
> >This way, you will restart freeradius only when needed.
> >You said that your backend is mysql, you will probably be able to come
> >up with the mysql version, but your main issue is not that.
> >SIGHUP must work.
>
> Coches nuevos, coches de ocasión, coches de Km 0 Si piensas en cambiar de
> coche, MSN Motor.



-- 

Peter Nixon
http://peternixon.net/




More information about the Freeradius-Users mailing list