0% found this document useful (0 votes)
35 views1 page

Skrip Mac Acak

This document outlines scripts to run on user login and logout. On login, it schedules a job to check connectivity and remove the user's hotspot and DHCP settings if disconnected. On logout, it removes the scheduled job.

Uploaded by

Dian Abdillah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

Skrip Mac Acak

This document outlines scripts to run on user login and logout. On login, it schedules a job to check connectivity and remove the user's hotspot and DHCP settings if disconnected. On logout, it removes the scheduled job.

Uploaded by

Dian Abdillah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

ON LOGIN

:local mac $"mac-address";


:local cekuser "cek-$user";
:system scheduler add name=$cekuser start-time=startup interval=00:00:05 on-
event=":if ([ping $address count=5]=0) do={:ip hotspot host remove [:ip hotspot
host find mac-address=$mac];:ip dhcp-server lease remove [:ip dhcp-server lease
find mac-address=$mac];:system scheduler remove [:system scheduler find
name=$cekuser];};
:ip hotspot user set mac-address="00:00:00:00:00:00" [:ip hotspot user find
name=$user];

ON LOGOUT
:local cekuser "cek-$user";
:system scheduler remove [:system scheduler find name=$cekuser];
:ip hotspot user set mac-address="00:00:00:00:00:00" [:ip hotspot user find
name=$user];

You might also like