<div dir="ltr"><div><div>freeradius 2.2.0-3<br><br> sqlcounter counterChilliSpotMaxTotalOctetsDaily {<br> counter-name = ChilliSpot-Max-Total-Octets-Daily<br> check-name = CS-Total-Octets-Daily<br>
counter-type = data<br> reply-name = ChilliSpot-Max-Total-Octets<br> sqlmod-inst = sql<br> key = User-Name<br> reset = daily<br> query = "SELECT IFNULL((SUM(AcctInputOctets + AcctOutputOctets)),0) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"<br>
}<br><br> sqlcounter counterChilliSpotMaxTotalOctetsAll {<br> counter-name = ChilliSpot-Max-Total-Octets<br> check-name = CS-Total-Octets<br> counter-type = data<br> reply-name = ChilliSpot-Max-Total-Octets<br>
sqlmod-inst = sql<br> key = User-Name<br> reset = never<br> query = "SELECT IFNULL((SUM(AcctInputOctets + AcctOutputOctets)),0) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"<br>
}<br><br></div>I use CS-Total-Octets-Daily to give staff a daily limit and CS-Total-Octets to give guests a "jump start".<br><br>Guests can buy more bandwidth via PayPal and it is appended to their CS-Total-Octets which works great.<br>
<br>Problem is when a staff member buys more they all of a sudden have CS-Total-Octets and CS-Total-Octets-Daily in their radcheck which locks them out because their bandwidth usage is over CS-Total-Octets.<br><br></div>Does anyone see a solution to my problem other than staff using 2 accounts?<br>
<div><br></div></div>