Advertisement
kajege

Validity User Hotspot

Apr 15th, 2017
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #VALIDITY user hostpot tanpa user manager by Master Cespun
  2. #dalam user manager terdapat "validity" untuk expired user hotspot, bagaimana bila tanpa user manager ?
  3. #contoh validity 1 hari, artinya 1 hari setelah user login pertama kali :
  4. #pertama, bikin ip hotspot "User Profile" dengan nama, misal "validity-1hari"
  5. #lalu masukkan "On Login" script berikut :
  6. {
  7. :local usernya $user;
  8. :if ([/system script find name=$usernya]="") do={
  9. /system script add name=$usernya source="/ip hotspot user disable [find name=$usernya]"
  10. }
  11. :if ([/system schedule find name=$usernya]="") do={
  12. /system schedule add name=$usernya interval=1d on-event=$usernya
  13. }
  14. }
  15. - buat user dengan nama misal "test" degan "User Profile" yang dibuat tadi yaitu "validity-1hari"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement