Packet Type in modules
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Thu Nov 29 14:38:38 CET 2012
On 29 Nov 2012, at 13:00, Alexandre J. Correa - Onda Internet <alexandre at onda.net.br> wrote:
> Hello,
>
> I have some scripts that do some sync tasks when freeradius start accouting:
>
> Like this:
>
> created module, named 'sysnotify' with this:
>
> exec sysnotify {
> wait = no
> program = "/ondasys/system/sysnotify %{User-Name:-Nenhum} %{Framed-IP-Address:-Nenhum} %{Acct-Status-Type:-ERR} %{Acct-Session-Id:-ERR} %{NAS-IP-Address}"
> packet_type = Accounting-Request
> }
>
>
> and, instanciated at preacct block:
>
> preacct {
> acct_unique
> sysnotify
> }
>
> it´s working fine, but i need to optimize this, because this scripts are running in Accouting-Start, Accouting-Stop and Interim-Update ..
>
> How i can catch ONLY Start and Stop events ?
preacct {
if ((Acct-Status-Type == 'Start') || (Acct-Status-Type == 'Stop')) {
sysnotify
}
}
-Arran
More information about the Freeradius-Users
mailing list