I would like to trigger the accounting interim-update on freeradius and then exec a script to performe a calculation about the total data volume usage related a specific user. Could anyone help me with some example?
Thank you
Sure that's pretty simple
Put the contents of the accounting block below into raddb/sites-available/default
and modify as necessary.
accounting {
if (Acct-Status-Type == 'Interim-Update') {
update request {
Tmp-Integer-0 := `/path/to/my/script.sh %{Acct-Input-Octets} %{Acct-Output-Octets} %{Acct-Session-Time}`
}
}
}