hello,
create profile in user manager, and limitation, and set group (name of new profile in hotspot user-profile).
of course you must set the validity in profile setting and not set transfer in limitation and nothing in rate-limit
then,
in hotspot user-profile script on-login set this rule:
{
:local upld [:tonum [/tool user-man user get $user upload-used]];
:local downld [:tonum [/tool user-man user get $user download-used]];
:local tr ($upld + $downld);
if ($tr > 16106127360) do={
/queue simple add max-limit=128k/128k name=$user target=$address;
} else {
/queue simple add max-limit=256k/1024k name=$user target=$address;
}
}
:local out [/ip hotspot get 0 interface];
/queue simple remove [find target=$out];
in log-out :
/queue simple remove [find name=$user];
the user will have rate-limit 256k/1024k but if he used the 15GB the rate-limit 128k/128k , you can change it in script if you want.
------
you can see this, it's arabic but you can understand by photos
http://max-upgrade.blogspot.com/2017/01/blog-post.html