Hello, I have configure my FreeRadius to work with MySQL, I also add the sqlcounter to count the hours user after the first login.
Here is my code:
mods-enabled/sqlcounter:
sqlcounter checkthetime {
sql_module_instance = sql
dialect = ${modules.sql.dialect}
counter_name = All-Hours-Passed
check_name = Max-Hours-Passed
reply_name = Session-Timeout
key = User-Name
reset = never
$INCLUDE ${modconfdir}/sql/counter/${dialect}/${.:instance}.conf
}
SELECT HOUR(SEC_TO_TIME(UNIX_TIMESTAMP() - UNIX_TIMESTAMP(AcctStartTime))) \