Check for a working make before running it.
[freeradius.git] / raddb / modules / sqlcounter_expire_on_login
1 # -*- text -*-
2 #
3 #  $Id$
4
5 #
6 #  Set an account to expire T seconds after first login.
7 #  Requires the Expire-After attribute to be set, in seconds.
8 #  You may need to edit raddb/dictionary to add the Expire-After
9 #  attribute.
10 #
11 #  This example is for MySQL.  Other SQL variants should be similar.
12 #
13 sqlcounter expire_on_login {
14         counter-name = Expire-After-Initial-Login
15         check-name = Expire-After
16         sqlmod-inst = sql
17         key = User-Name
18         reset = never
19         query = "SELECT TIME_TO_SEC(TIMEDIFF(NOW(), acctstarttime)) \
20                  FROM radacct \
21                  WHERE UserName='%{%k}' \
22                  ORDER BY acctstarttime \
23                  LIMIT 1;"
24 }