Hi Eric,

I'm not sure if this is what you're looking for or if it's the best way to do it but the following setup allows a user to authenticate for a predetermined time
from first usage. i.e. if I set the time period to be 24hrs then a scratch card is valid for 24hrs from first usage.

in "radcheck" mysql table

Max-All-Session := 86400

sqlcounter.conf contains:

sqlcounter noresetsqlcounter {
counter-name = Max-All-Session-Time
check-name = Max-All-Session
sqlmod-inst = sql
key = User-Name
reset = never
query = "SELECT UNIX_TIMESTAMP()-UNIX_TIMESTAMP(AcctStartTime) FROM radacct WHERE UserName='%{%k}' ORDER BY AcctStartTime LIMIT 1"
}


From: Eric <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Expiration of prepaid cards
Date: Fri, 21 Feb 2003 09:41:02 +0500

Hello,
I need to make special prepaid cards, which will expire after 2 month of
usage.
Can anyone to help me to write this module for sqlcounter?
Thanks!!!

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
_________________________________________________________________
MSN Messenger - fast, easy and FREE! http://messenger.msn.co.uk


- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to