=== kuota 1GB per hari, expired 30 hari ===
on login script :
{
:local usernya $user;
:if ([/ip hotspot user find name=$usernya limit-bytes-total=1000000]="") do={/ip hotspot user set [find name=$usernya] limit-bytes-total=1000000};
:if ([/system schedule find name=$usernya]="") do={
/system schedule add name=$usernya interval=30d on-event="/ip hotspot user disable [find name=$usernya]\r\n/ip hotspot active remove [find user=$usernya]\r\n/system schedule remove [find name=$usernya-reset-counter]\r\n/system schedule remove [find name=$usernya]"
}
:if ([/system schedule find name="$usernya-reset-counter"]="") do={
/system schedule add name="$usernya-reset-counter" interval=1d on-event="/ip hotspot user reset-counter [find name=$usernya]"
}
}
Script diatas tambahkan pada hotspot on login script
Semoga bermanfaat.
0 comments:
Post a Comment